?
Solved

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

Posted on 2010-01-09
6
Medium Priority
?
1,327 Views
Last Modified: 2012-06-21
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
Comment
Question by:real_icecoke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 1

Author Comment

by:real_icecoke
ID: 26274898
... of course I meant: I have the source of rsync... ;) I know deltacopy is the wrapper....
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 26276204
rsync isn't for applying diffs to files, it is to sync directories.
0
 
LVL 1

Author Comment

by:real_icecoke
ID: 26277029
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
Technology Partners: 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!

 
LVL 1

Accepted Solution

by:
real_icecoke earned 0 total points
ID: 26302299
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
 
LVL 26

Expert Comment

by:EddieShipman
ID: 26305699
Do yu have Delphi units for using these DLL's? If so, why don't you post them for all to use?
0
 
LVL 1

Author Comment

by:real_icecoke
ID: 26330465
the jedi project has them
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question