| | |
"difference patching" help
![]() |
•
•
Join Date: May 2003
Posts: 1
Reputation:
Solved Threads: 0
"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?
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?
•
•
•
•
Originally Posted by infamous
try comparing line by line, not bit by bit.
A Hacker's Mind:
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes..." - J.D.Salinger
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes..." - J.D.Salinger
![]() |
Similar Threads
- ";:<script><html>< // >@@#"; (PHP)
- what's the difference between using an ordinary pointer and a "pointer to member"? (C++)
- Should replacing a 15" laptop screen with 14.1" make a difference? (Monitors, Displays and Video Cards)
Other Threads in the C Forum
- Previous Thread: VxD creation for Windows 2000 server
- Next Thread: ?'s, JPG, Free Store and Compiler Synthesis
| Thread Tools | Search this Thread |
* adobe ansi api array asterisks binarysearch calculate centimeter char character cm convert copyanyfile copyimagefile copypdffile cprogramme createcopyoffile createprocess() csyntax directory feet fflush fgets file floatingpointvalidation fork frequency function getlasterror getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux hacking highest homework i/o inches infiniteloop interest intmain() kilometer km linked linkedlist linux linuxsegmentationfault list locate logical_drives match meter microsoft mqqueue mysql number oddnumber odf open opendocumentformat openwebfoundation owf pattern pdf performance posix power probleminc program programming pyramidusingturboccodes read recv recvblocked repetition scanf scheduling segmentationfault send single socketprograming socketprogramming stack standard strchr string suggestions systemcall unix urboc user variable voidmain() wab whythiscodecausesegmentationfault win32api windows.h






think about it and post back if you need help setting it up