[Slackbuilds-users] txz?
B. Watson
urchlay at slackware.uk
Tue Oct 6 21:23:38 UTC 2026
On Tue, 6 Oct 2026, Yth O’Gtha wrote:
> It really depends on the data.
> I've been faced with having to fetch various data, logs and binary files, from a
> distant virtual machine, without much power (only 2 cores, not a lot of memory),
> repeatedly, for tests.
> And bzip2 was my choice, de/compressing is almost as fast as with gzip,
> while compression ratio was half-way to xz.
Interesting. I wouldn't have even thought of trying bzip2.
I discovered something about xz. Its man page says:
-0 ... -3
These are somewhat fast presets. -0 is sometimes faster
than gzip -9 while compressing much better. The higher
ones often have speed comparable to bzip2(1) with compa‐
rable or better compression ratio, although the results
depend a lot on the type of data being compressed
...and for the font 99MB font package I was playing with, that turned
out to be true. I added --compress -0 to the makepkg line in the
SlackBuild (also tried -3 and -6).
Looking at /sbin/makepkg... the default compression level is -9,
and it doesn't inherit from the environment. So if we wanted to
make the compression level user-selectable in the environment for
our SlackBuilds, we'd have to change the makepkg line in all 10,000
scripts... something like:
/sbin/makepkg --compress ${COMPRESS_OPTION:-9} -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
I wonder if someone could talk Pat into making a one-line change to
makepkg? Replace this:
COMPRESS_OPTION="-9"
...with this:
COMPRESS_OPTION="${COMPRESS_OPTION:-9}"
If so, SBo users would be able to set the compression level without
us editing 10,000 scripts (and GPG signing them, which is the real
time-consuming part).
More information about the SlackBuilds-users
mailing list