unzstd(1)
Decompress files compressed with the Zstandard (zstd) compression algorithm.
Synopsis
unzstd [OPTION]... [FILE]...Description
unzstd is a wrapper script that decompresses Zstandard-compressed files, typically those with .zst or .tzst extensions. It is equivalent to running zstd with the --decompress flag. The command preserves file permissions and timestamps by default.
If no input file is specified, unzstd reads from standard input and writes decompressed data to standard output, making it useful in pipelines. Multiple files can be decompressed in a single invocation.
Common options
| Flag | What it does |
|---|---|
-d | Decompress (same as --decompress; this is the default behavior) |
-f | Force overwrite of output files without prompting |
-k | Keep input files after decompression (do not delete .zst file) |
-o FILE | Write decompressed output to specified file instead of replacing .zst with base name |
-c | Write decompressed data to stdout; do not modify input files |
-v | Verbose mode; display compression ratio and speed statistics |
--rm | Remove input files after successful decompression |
-T | Set number of worker threads for parallel decompression |
--long | Enable long-distance matching for better compression on large files |
Examples
Decompress archive.zst to archive in the same directory
unzstd archive.zstDecompress data.zst and write output to stdout, redirecting to data.txt
unzstd -c data.zst > data.txtDecompress all .zst files in current directory, keeping the original compressed files
unzstd -k *.zstDecompress compressed.zst and write to a custom output filename
unzstd -o output.bin compressed.zstExtract a tar archive compressed with zstd using unzstd as the decompression filter
tar -I unzstd -xf backup.tar.zstDecompress file.zst from stdin and pipe decompressed output to grep
cat file.zst | unzstd -c | grep patternDecompress with verbose output showing decompression speed and ratio
unzstd -v large.zstDecompress using 4 parallel worker threads for faster decompression
unzstd -T 4 massive.zst