Creating a Data Patch?

Is it possible to create some kind of patch that recognizes the differences between two files, (the byte structure for example) and it creates a new data file from the old one? Because up to now, my patches had to contain the WHOLE data files. I’d also like to code it in java. Any help/suggestions/tutorials are welcome.

Thank you.

I do not have a solution but some ideas you might try:

  • use check sum to find files to be changed.

  • generate a XOR diffeference between every corresponding byte in both the old file and new file then send the XOR difference. (this XOR map should compress really well for files with little changes)

if I select create patch in eclipse it creates files with only the changes. (We patch program configurations to suit each distro’s needs.) perhaps I’m missing the problem.

I’m talking about making EXE/Jar patches that patch/update data files, like Zip, or encrypted archive files, without redownloading the whole thing.