Arch Linux plans to use zstd as the default compression method
Over the past few weeks, Arch Linux maintainers have compared different compression algorithms and eventually plan to use zstd instead of the default compression algorithm in devtools.
The current compression method is `xz -c -z -`, which is single-threaded and slow, so the team wants to replace it with a faster algorithm. Although multi-threaded xz has already appeared, it was not possible to complete the function in some unexpected cases, so it was quickly eliminated.
The new idea is to use Facebook’s zstd algorithm, also known as Zstandard, which “is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios.” After a series of tests, the Arch team concluded that:
the benefits of `zstd -c -T0 -18 -` over `xz -c -z -` are:
– Massive speed gain in compression
– Massive speed gain in decompression
– Stable, reproducible multithreading
The speed gain in decompression substantially increases pacman’s package installation speed.While the trade-offs would be:
– Minimal increase in compressed package size
– Increase in memory usage during compressionThe required changeset is, i think:
PKGEXT=’.pkg.tar.zst’
COMPRESSZST=(zstd -c -T0 -18 -)