unzstd
Decompress .zst files
TLDR
View documentation for the original command
SYNOPSIS
unzstd [options] [files...]
PARAMETERS
-d, --decompress
Decompress the input file(s). This is the default operation for unzstd and is often implied.
-f, --force
Force overwrite of existing output files without prompting for confirmation.
-k, --keep
Keep (do not delete) the input files after successful decompression. By default, unzstd deletes the original compressed file.
-o <file>, --output <file>
Write the decompressed output to the specified <file> instead of standard output or a derived filename.
-q, --quiet
Suppress all warning and informational messages, showing only critical errors.
-v, --verbose
Enable verbose mode, displaying more detailed information during the decompression process, such as compression ratio.
--rm
Remove source files after successful decompression. This is the default behavior unless -k is specified.
-c, --stdout
Write all decompressed data to standard output. This is automatically set if multiple input files are specified or if the output is redirected to a terminal.
-D <dir>, --output-directory <dir>
Decompress input files into the specified directory <dir>, maintaining original filenames (without the .zst suffix).
-h, --help
Display a help message with command options and exit.
-V, --version
Display the version number of zstd (which unzstd is part of) and exit.
DESCRIPTION
unzstd is a command-line utility specifically designed to decompress files that have been compressed using the Zstandard (zstd) compression algorithm. It typically functions as a convenient symbolic link or hard link to the zstd command, implicitly setting the decompression mode. When executed, unzstd reads compressed data from a specified file or standard input, efficiently decompresses it, and writes the uncompressed data to standard output or a specified output file. Zstandard is widely recognized for its exceptional balance of high compression ratios and remarkably fast decompression speeds, making unzstd an essential tool for quickly restoring data from zstd archives, particularly in environments where rapid data retrieval is critical. By default, it automatically identifies and processes files with the .zst extension or other common Zstandard suffixes, outputting the decompressed content with the suffix removed.
CAVEATS
unzstd expects its input to be valid Zstandard-compressed data. Providing malformed or non-Zstandard input may result in decompression errors or corrupted output.
By default, unzstd deletes the original compressed file upon successful decompression. To retain the original file, use the -k or --keep option.
The command does not preserve original file permissions, ownership, or timestamps on the decompressed output file; these attributes will be set according to the user's umask and current system time.
INPUT AND OUTPUT BEHAVIOR
If no input files are specified, unzstd reads compressed data from standard input (stdin) and writes the decompressed data to standard output (stdout).
When a single input file with a .zst extension (e.g., archive.zst) is provided, unzstd decompresses it and creates an output file with the .zst suffix removed (e.g., archive).
If multiple input files are specified, or if the output is redirected to a terminal, unzstd will automatically write all decompressed output to standard output, unless the -o or -D option is used to specify an output file or directory.
HISTORY
unzstd is not an independent command but rather a functional alias or symbolic link provided by the zstd compression utility suite. The Zstandard algorithm and its accompanying tools were developed by Yann Collet at Facebook (now Meta) and publicly released as open-source software in 2016. The primary motivation behind zstd was to create a new compression standard that offers superior performance in both compression ratio and speed, particularly decompression speed, compared to existing algorithms like zlib and gzip. The inclusion of unzstd as a distinct command name from the outset aimed to provide users with a familiar decompression interface, mirroring the convention established by tools such as gunzip and bunzip2, thereby ensuring ease of adoption and integration into existing workflows.