zstd(1) -- zstd, zstdmt, unzstd, zstdcat - Compress or decompress .zst files



zstdmt is equivalent to zstd -T0

unzstd is equivalent to zstd -d

zstdcat is equivalent to zstd -dcf


zstd is a fast lossless compression algorithm and data compression tool, with command line syntax similar to gzip (1) and xz (1). It is based on the LZ77 family, with further FSE & huff0 entropy stages. zstd offers highly configurable compression speed, with fast modes at > 200 MB/s per code, and strong modes nearing lzma compression ratios. It also features a very fast decoder, with speeds > 500 MB/s per core.

zstd command line syntax is generally similar to gzip, but features the following differences :

zstd compresses or decompresses each file according to the selected operation mode. If no files are given or file is -, zstd reads from standard input and writes the processed data to standard output. zstd will refuse to write compressed data to standard output if it is a terminal : it will display an error message and skip the file. Similarly, zstd will refuse to read compressed data from standard input if it is a terminal.

Unless --stdout or -o is specified, files are written to a new file whose name is derived from the source file name:

Concatenation with .zst files

It is possible to concatenate .zst files as is. zstd will decompress such files as if they were a single .zst file.


Integer suffixes and special values

In most places where an integer argument is expected, an optional suffix is supported to easily indicate large integers. There must be no space between the integer and the suffix.

Operation mode

If multiple operation mode options are given, the last one takes effect.

Operation modifiers


zstd offers dictionary compression, useful for very small files and messages. It's possible to train zstd with some samples, the result of which is saved into a file called a dictionary. Then during compression and decompression, reference the same dictionary. It will improve compression ratio of small files. Typical gains range from 10% (at 64KB) to x5 better (at <1KB).




zstd provides 22 predefined compression levels. The selected or default predefined compression level can be changed with advanced compression options. The options are provided as a comma-separated list. You may specify only the options you want to change and the rest will be taken from the selected or default compression level. The list of available options:


Select the size of each compression job. This parameter is available only when multi-threading is enabled. Default value is 4 * windowSize, which means it varies depending on compression level. -B# makes it possible to select a custom value. Note that job size must respect a minimum value which is enforced transparently. This minimum is either 1 MB, or overlapSize, whichever is largest.


The following parameters sets advanced compression options to those of predefined level 19 for files bigger than 256 KB:



Report bugs at:


Yann Collet

Try the zstdr package in your browser

Any scripts or data that you put into this service are public.

zstdr documentation built on June 7, 2017, 1:02 a.m.