943,482 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 3310
  • C RSS
May 8th, 2003
2

"difference patching" help

Expand Post »
"difference patching" is my word for the method used by patch makers that take only the differences in two files, and apply them to a patch file. RTPatch is an example of a program that does this.

I've been trying to create one myself, but I'm stuck on the logic. The only way I can think of to do it is to compare the bits in both of the files, and if oldfile[x] != newfile[x] then save the offset and value of newfile[x] to the patch file.

I don't think that's the way it should be done, because nearly all the bits will be different, and you'll end up with a larger patch file than it would be with any other patch program.

Maybe I just need a fresh perspective on it, but I can't think of a more efficient way of doing it. Can anyone help?
Similar Threads
Reputation Points: 12
Solved Threads: 0
Newbie Poster
ctlajoie is offline Offline
1 posts
since May 2003
Mar 26th, 2004
0

Re: "difference patching" help

have you considered using recursion think about it and post back if you need help setting it up
Reputation Points: 28
Solved Threads: 9
Posting Whiz in Training
BountyX is offline Offline
222 posts
since Mar 2004
Mar 27th, 2004
0

Re: "difference patching" help

try comparing line by line, not bit by bit.
Reputation Points: 47
Solved Threads: 2
Junior Poster in Training
infamous is offline Offline
77 posts
since Mar 2004
Mar 28th, 2004
0

Re: "difference patching" help

Quote originally posted by infamous ...
try comparing line by line, not bit by bit.
comparing line by line might be errorneous, but if not its worth a shot. If your trying to patch a file by getting the asic contents of one exe and comparing it with the asci contents of another, that won't work.
Reputation Points: 28
Solved Threads: 9
Posting Whiz in Training
BountyX is offline Offline
222 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: VxD creation for Windows 2000 server
Next Thread in C Forum Timeline: ?'s, JPG, Free Store and Compiler Synthesis





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC