Link to home
Start Free TrialLog in
Avatar of real_icecoke
real_icecokeFlag for Germany

asked on

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
Avatar of real_icecoke
real_icecoke
Flag of Germany image

ASKER

... of course I meant: I have the source of rsync... ;) I know deltacopy is the wrapper....
Avatar of Eddie Shipman
rsync isn't for applying diffs to files, it is to sync directories.
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.




ASKER CERTIFIED SOLUTION
Avatar of real_icecoke
real_icecoke
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Do yu have Delphi units for using these DLL's? If so, why don't you post them for all to use?
the jedi project has them