"difference patching" help

Reply

Join Date: May 2003
Posts: 1
Reputation: ctlajoie is an unknown quantity at this point 
Solved Threads: 0
ctlajoie ctlajoie is offline Offline
Newbie Poster

"difference patching" help

 
2
  #1
May 8th, 2003
"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?
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 219
Reputation: BountyX is an unknown quantity at this point 
Solved Threads: 7
BountyX's Avatar
BountyX BountyX is offline Offline
Code Guru

Re: "difference patching" help

 
0
  #2
Mar 26th, 2004
have you considered using recursion think about it and post back if you need help setting it up
A Hacker's Mind:
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes..." - J.D.Salinger
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 77
Reputation: infamous is an unknown quantity at this point 
Solved Threads: 2
infamous infamous is offline Offline
Junior Poster in Training

Re: "difference patching" help

 
0
  #3
Mar 27th, 2004
try comparing line by line, not bit by bit.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 219
Reputation: BountyX is an unknown quantity at this point 
Solved Threads: 7
BountyX's Avatar
BountyX BountyX is offline Offline
Code Guru

Re: "difference patching" help

 
0
  #4
Mar 28th, 2004
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.
A Hacker's Mind:
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes..." - J.D.Salinger
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC