Binary diff/patch algorithm based on bsdiff 4.3 by Colin Percival. It's very effective at compressesing incremental changes in binaries.
This implementation has the following differences from Colin's code, to make it easier to read and apply patches in Java and Objective C: