tags:

views:

161

answers:

2

What's the best way to go about making a patch for a binary file? I want it to be simple for users to apply(a simple patch application would be nice). Running diff on the file just gives Binary files [...] differ

+2  A: 

If using something else than the standard patch is an option for you, you might want to check out bsdiff and bspatch:

http://www.daemonology.net/bsdiff/

bsdiff and bspatch are tools for building and applying patches to binary files. [...]

Heinzi
A: 

Assuming you know the structure of the file you could use a c / c++ program to modify it byte by byte:

http://msdn.microsoft.com/en-us/library/c565h7xx%28VS.71%29.aspx

Just read in the old file, and write out a new one modified as you like.

Don't forget to include a file format version number in the file so you know how to read any given version of the file format.

Jamie Clarke