[pacman-dev] [PATCH] pkgdelta: use highest compression ratio when creating deltas with xdelta3
Matthias Krüger
matthias.krueger at famsik.de
Wed Mar 5 18:25:21 EST 2014
Looking how pkgdelta works, I found this line
xdelta3 -q -f -s "$oldfile" "$newfile" "$deltafile" || ret=$?
which seemed to be responsible for the actual delta generation, however
man xdelta3
revealed that there were different compression levels (0-9) (not sure
which one is default).
To make it short, we could have had smaller deltas since pkgdelta was
introduced!
Examples:
-9 16660K blender-12:2.69.c7ac0e-1_to_13:2.69.13290d-1-x86_64.delta
default 17832K blender-12:2.69.c7ac0e-1_to_13:2.69.13290d-1-x86_64.delta
-9 504K xbmc-12.3-10_to_12.3-11-x86_64.delta
default 572K xbmc-12.3-10_to_12.3-11-x86_64.delta
The attached patch adds the "-9" option to the line above.
Side note: it might be even more advantageous to use bsdiff instead of
xdelta3
comparing the /usr/bin/blender binaries of the above versions
(12:2.69.c7ac0e-1 and 13:2.69.13290d-1) :
xdelta3 10.4M
xdelta3 -9 9.9M
bsdiff 4.7M
,however bsdiff is only for direct diff creation, bsdiff foo1.pkg.tar.xz
foo2.pkg.tar.xz will create a diff between the archives and not their
contents, so that'd require further coding which I am unable to do
(maybe someone else volunteers :) ).
Kind regards, Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-pkgdelta-use-highest-compression-level-9-when-xdelta.patch
Type: text/x-patch
Size: 1015 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/pacman-dev/attachments/20140306/fba99e35/attachment.bin>
More information about the pacman-dev
mailing list