Tuesday, October 27, 2015

Quick EXE patching experiment: bsdiff/xdelta vs. lzham

This is just a couple data points, so I'm not going to read much into this. I'm just trying to get a feel for how far away LZHAM's current support for patch generation is vs. other well known tools.

Unity46.exe -> Unity52.exe:

Unity46.exe: 30476872
Unity52.exe: 41259480
lzham_codec_devel (1): 8737015 
lzham_codec_devel (2): 8605360
bsdiff: 12320793
xdelta: 14233171

Unity510.exe -> Unity512.exe:

Unity510.exe: 52680480
Unity512.exe: 52740568
lzham_codec_devel (1): 5042088
lzham_codec_devel (2): 4736124
bsdiff: 3810343
xdelta: 11945751 

bsdiff: Windows version, based off bsdiff 4.1
xdelta: -9 (max compression)
lzham 1 settings: -m4 -x8 -d27
lzham 2 settings: -o -e -b -h4 -m4 -x16 -d27

Note about lzham settings: 2 is ridiculously slow (and because of -x16 required rebuilding the compressor DLL), but it shows the highest ratios lzham is capable of at the moment.

Quick and dirty conclusions:
xdelta isn't doing well here.

When the old/new files resemble each other (Unity510.exe vs. Unity512.exe), bsdiff beats LZHAM by a significant margin.

On the other hand, when the files aren't so similar (Unity46.exe vs. Unity52.exe), the tables are turned and LZHAM beats bsdiff. Hmm.

No comments:

Post a Comment