DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C (http://www.daniweb.com/forums/forum118.html)
-   -   "difference patching" help (http://www.daniweb.com/forums/thread448.html)

ctlajoie May 8th, 2003 11:58 am
"difference patching" help
 
"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?

BountyX Mar 26th, 2004 8:10 pm
Re: "difference patching" help
 
have you considered using recursion ;) think about it and post back if you need help setting it up

infamous Mar 27th, 2004 3:17 pm
Re: "difference patching" help
 
try comparing line by line, not bit by bit.

BountyX Mar 28th, 2004 1:38 am
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.


All times are GMT -4. The time now is 12:20 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC