Package: xz-utils Version: 5.2.4-1+b1 Severity: wishlist Hi! On the battlefield of general-purpose mainstream compressors, there are two entrants left: xz and zstd. The former wins for compression ratio, the latter is good for medium and low compression levels, making stuff like gzip or lzo redundant. In fact, I just noticed one of my use cases gets sped up by ~10× by moving from gzip to zstd.
While zstd is not xz, out of all compressors shipping their own FOOgrep, your xzgrep can handle most of the rest. Thus, instead of adding a yet another set of binaries, I believe it would be nice to instead make xzgrep more universal -- and perhaps, on a later day, replace all others with symlinks. Attached patch does the first part: adds zstd support. Meow! -- System Information: Debian Release: bullseye/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.9.0-rc6-00029-g30fa038072a9 (SMP w/64 CPU threads) Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages xz-utils depends on: ii libc6 2.31-3 ii liblzma5 5.2.4-1+b1 xz-utils recommends no packages. xz-utils suggests no packages. -- no debconf information -- debsums errors found: debsums: changed file /usr/bin/xzgrep (from xz-utils package)
>From 54140e8697b8414997bea9d4561fe4aa4f7a02f6 Mon Sep 17 00:00:00 2001 From: Adam Borowski <kilob...@angband.pl> Date: Fri, 25 Sep 2020 03:09:11 +0200 Subject: [PATCH] Teach xzgrep about zstd. --- src/scripts/xzgrep.1 | 3 +++ src/scripts/xzgrep.in | 1 + 2 files changed, 4 insertions(+) diff --git a/src/scripts/xzgrep.1 b/src/scripts/xzgrep.1 index 4bddbe2d..bc6c8104 100644 --- a/src/scripts/xzgrep.1 +++ b/src/scripts/xzgrep.1 @@ -41,6 +41,7 @@ which may be either uncompressed or compressed with .BR lzma (1), .BR gzip (1), .BR bzip2 (1), +.BR zstd (1), or .BR lzop (1). All options specified are passed directly to @@ -54,6 +55,7 @@ and fed to When reading from standard input, .BR gzip (1), .BR bzip2 (1), +.BR zstd (1), and .BR lzop (1) compressed files are not supported. @@ -95,4 +97,5 @@ or .BR gzip (1), .BR bzip2 (1), .BR lzop (1), +.BR zstd (1), .BR zgrep (1) diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in index a1fd19cf..cde8128f 100644 --- a/src/scripts/xzgrep.in +++ b/src/scripts/xzgrep.in @@ -158,6 +158,7 @@ for i; do *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) uncompress="gzip -cdfq";; *[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdfq";; *[-.]lzo | *[-.]tzo) uncompress="lzop -cdfq";; + *[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";; *) uncompress="$xz -cdfq";; esac # Fail if xz or grep (or sed) fails. -- 2.28.0