Hello,
I've created a patch for tar, which adds support for lz4 and zstd
compression. Both compression tools have become increasingly popular
and offer high-speed compression and decompression, making them
interesting alternatives to previous compression tools.
lz4 is similar to lzo, but offers faster decompression. zstd is
similar to gzip, but offers much faster compression and decompression.
See also:
http://lz4.github.io/lz4/
http://facebook.github.io/zstd/
For example, creating an archive from a directory of 1.12 GB
containing binary and ASCII files ("/usr/local/gnu/"):
Compression
name time size ratio
gnu.tar.gz 57.2s 534077354 44.3%
gnu.tar.bz2 1:53.9s 509401491 42.3%
gnu.tar.xz 7:15.6s 423886520 35.2%
gnu.tar.lz 7:37.2s 425162846 35.3%
gnu.tar.lzo 4.7s 676569472 56.2%
gnu.tar.lz4 4.9s 676600069 56.2%
gnu.tar.zst 10.7s 517897416 43.0%
Decompression
name time
gnu.tar.gz 7.1s
gnu.tar.bz2 45.2s
gnu.tar.xz 26.3s
gnu.tar.lz 30.4s
gnu.tar.lzo 3.5s
gnu.tar.lz4 2.0s
gnu.tar.zst 3.2s
A second example using the Linux kernel source code (4.12.4),
containing 697 MB of data:
Compression
name time size ratio
linux.tar.gz 28.2s 156988489 21.4%
linux.tar.bz2 1:05.5s 120659282 16.5%
linux.tar.xz 4:26.9s 102214892 13.9%
linux.tar.lz 4:18.4s 104105244 14.2%
linux.tar.lzo 3.6s 261745137 35.7%
linux.tar.lz4 3.9s 252707015 34.5%
linux.tar.zst 5.9s 150448272 20.5%
Decompression
name time
linux.tar.gz 3.6s
linux.tar.bz2 19.4s
linux.tar.xz 7.2s
linux.tar.lz 8.1s
linux.tar.lzo 2.5s
linux.tar.lz4 1.5s
linux.tar.zst 2.1s
(The tools were used with their default arguments. The hardware used
was an AMD FX8350 4GHz.)
Attached files are:
patch-part-1 - diffs of buffer.c config.h.in configure.ac suffix.c tar.c
patch-part-2 - diffs of tar.texi tar.1 cs.po de.po fi.po ga.po id.po
ru.po sl.po zh_CN.po
Cheers