.\"
.\" (Note that this file is not based on gzip's zdiff.1.)
.\"
-.TH XZDIFF 1 "2024-02-12" "Tukaani" "XZ Utils"
+.TH XZDIFF 1 "2024-02-13" "Tukaani" "XZ Utils"
.SH NAME
xzcmp, xzdiff, lzcmp, lzdiff \- compare compressed files
.
.BR gzip (1),
.BR bzip2 (1),
.BR lzop (1),
+.BR zstd (1),
or
-.BR zstd (1)
+.BR lz4 (1)
can decompress.
The required decompression commands are determined from
the filename suffixes of
.BR gzip (1),
.BR bzip2 (1),
.BR lzop (1),
-.BR zstd (1)
+.BR zstd (1),
+.BR lz4 (1)
xz1=lzop;;
*[-.]zst | *.tzst)
xz1='zstd -q';;
+ *[-.]lz4)
+ xz1=lz4;;
*)
printf '%s\n' "$0: $1: Unknown compressed file name suffix" >&2
exit 2;;
esac
case $1 in
- *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *[-.]lzo | *[-.]zst)
- FILE=`expr "X$1" : 'X\(.*\)[-.][abglmostxzZ2]*$'`;;
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *[-.]lzo | *[-.]zst | *[-.]lz4)
+ FILE=`expr "X$1" : 'X\(.*\)[-.][abglmostxzZ24]*$'`;;
*.t[abglx]z)
FILE=`expr "X$1" : 'X\(.*[-.]t\)[abglx]z$'`ar;;
*.tbz2)
*[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz1=gzip;;
*[-.]lzo | *.tzo) xz1=lzop;;
*[-.]zst | *.tzst) xz1='zstd -q';;
+ *[-.]lz4) xz1=lz4;;
esac
case $2 in
*[-.]bz2 | *.tbz | *.tbz2) xz2=bzip2;;
*[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz2=gzip;;
*[-.]lzo | *.tzo) xz2=lzop;;
*[-.]zst | *.tzst) xz2='zstd -q';;
+ *[-.]lz4) xz2=lz4;;
esac
case $1 in
- *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -)
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | *[-.]lz4 | -)
case "$2" in
- *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -)
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | *[-.]lz4 | -)
if test "$1$2" = --; then
xz_status=$(
exec 4>&1
esac;;
*)
case "$2" in
- *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -)
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | *[-.]lz4 | -)
xz_status=$(
exec 4>&1
($xz2 -cdf -- "$2" 4>&-; echo $? >&4) 3>&- |
.\"
.\" (Note that this file is not based on gzip's zgrep.1.)
.\"
-.TH XZGREP 1 "2024-02-12" "Tukaani" "XZ Utils"
+.TH XZGREP 1 "2024-02-13" "Tukaani" "XZ Utils"
.SH NAME
xzgrep \- search possibly-compressed files for patterns
.
.BR gzip (1),
.BR bzip2 (1),
.BR lzop (1),
+.BR zstd (1),
or
-.BR zstd (1)
+.BR lz4 (1)
will be decompressed;
all other files are assumed to be uncompressed.
.PP
.BR bzip2 (1),
.BR lzop (1),
.BR zstd (1),
+.BR lz4 (1),
.BR zgrep (1)
*[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdf";;
*[-.]lzo | *[-.]tzo) uncompress="lzop -cdf";;
*[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";; # zstd needs -q.
+ *[-.]lz4) uncompress="lz4 -cdf";;
*) uncompress="$xz -cdfqQ";; # -qQ to ignore warnings like unsupp. check.
esac
# xz_status will hold the decompressor's exit status.