bsdiff and bspatch are tools for building and applying patches to binary files. Thanks to Marco Bonetti.