понедельник, 19 февраля 2018 г.

diff binary files


bsdiff/bspatch  AKA "Cannot allocate memory. Killed."

bsdiff is quite memory-hungry. It requires max(17*n,9*n+m)+O(1) bytes of memory, where n is the size of the old file and m is the size of the new file. bspatch requires n+m+O(1) bytes.

bsdiff runs in O((n+m) log n) time; on a 200MHz Pentium Pro, building a binary patch for a 4MB file takes about 90 seconds. bspatch runs in O(n+m) time; on the same machine, applying that patch takes about two seconds.

xdelta3

EXAMPLES
       Compress the differences between SOURCE and TARGET, yielding OUT, using
       "djw" secondary compression:
       xdelta3 -S djw -s SOURCE TARGET OUT

       Do the same, using standard input and output:
       xdelta3 -S djw -s SOURCE < TARGET > OUT

       To decompress OUT, using SOURCE, yielding TARGET:
       xdelta3 -d -s SOURCE OUT TARGET