Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1357
  • Last Modified:

rdiff, deltacopy, rsync - some relevant code in delphi available?

Hi there,

I'm trying to write some code in Delphi which is comparing the delta diffs in binary files like rdiff, rsync and deltacopy does. Then, after creating the 'diff' apply it on some 'old' file in a different directory/server - just like we know it with rsync.

I have the deltacopy source, but my understanding of C++ is even below my delphi knowledge ;) So, experts, I ask you! Does anyone have some short samples how to get, isolate and apply delta diffs of binary files?

many thanks in advance!

icecoke
0
real_icecoke
Asked:
real_icecoke
  • 4
  • 2
1 Solution
 
real_icecokeAuthor Commented:
... of course I meant: I have the source of rsync... ;) I know deltacopy is the wrapper....
0
 
Eddie ShipmanAll-around developerCommented:
rsync isn't for applying diffs to files, it is to sync directories.
0
 
real_icecokeAuthor Commented:
I'm sorry if I did not wrote my question correct.

Of  course rsync is not 'for' applying diffs to files. But it uses an internal mech (with delta diffs)  to just transfer the changed parts of a binary file from a to b while it does syncing directories. This mech is of interest for me.

In general it must be that way:
You have a client and a server, both have a different version of file A.
The client does some hashing of different parts of the file, the server does the same, than both sides compare it hashes and just the changed parts are transfer from client to server and applied to the server file A.

This would be easy if the length of the files are equal, but it's going to be interesting, when the length changes etc. The most interesting part is: you DON'T want to compare the files byte by bytes, cause in that case you would save yourself many bytes in transfering if you just sent the whole file up.... We should not forget that these different files are on different servers and my main interest is to save bytes at the transfer.

I hope this clears my question a little bit more.




0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
real_icecokeAuthor Commented:
hmm, experts, I'm suprised - no response?
Ok, for who are interested in a solution for this problem: take a look into msdelta.dll and mspatchc(a).dll - these dlls (especially msdelta.dll) provide delta compresion funcs, saving you tons of bytes in applying patches etc. All found in the microsoft dev SDK.

Anyway, thanks for trying to help!
icecoke
0
 
Eddie ShipmanAll-around developerCommented:
Do yu have Delphi units for using these DLL's? If so, why don't you post them for all to use?
0
 
real_icecokeAuthor Commented:
the jedi project has them
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now