OS Manuals

/usr/bin/unzstd

the Zstandard compression algorithm

From zstd 1.5.7-r13 (os), captured 2026-11-05 by running unzstd --help (exit 0). permalink

*** Zstandard CLI (64-bit) v1.5.7, by Yann Collet ***

Compress or decompress the INPUT file(s); reads from STDIN if INPUT is `-` or not provided.

Usage: unzstd [OPTIONS...] [INPUT... | -] [-o OUTPUT]

Options:
  -o OUTPUT                     Write output to a single file, OUTPUT.
  -k, --keep                    Preserve INPUT file(s). [Default]
  --rm                          Remove INPUT file(s) after successful (de)compression.

  -#                            Desired compression level, where `#` is a number between 1 and 19;
                                lower numbers provide faster compression, higher numbers yield
                                better compression ratios. [Default: 3]

  -d, --decompress              Perform decompression.
  -D DICT                       Use DICT as the dictionary for compression or decompression.

  -f, --force                   Disable input and output checks. Allows overwriting existing files,
                                receiving input from the console, printing output to STDOUT, and
                                operating on links, block devices, etc. Unrecognized formats will be
                                passed-through through as-is.

  -h                            Display short usage and exit.
  -H, --help                    Display full help and exit.
  -V, --version                 Display the program version and exit.

Advanced options:
  -c, --stdout                  Write to STDOUT (even if it is a console) and keep the INPUT file(s).

  -v, --verbose                 Enable verbose output; pass multiple times to increase verbosity.
  -q, --quiet                   Suppress warnings; pass twice to suppress errors.
  --trace LOG                   Log tracing information to LOG.

  --[no-]progress               Forcibly show/hide the progress counter. NOTE: Any (de)compressed
                                output to terminal will mix with progress counter text.

  -r                            Operate recursively on directories.
  --filelist LIST               Read a list of files to operate on from LIST.
  --output-dir-flat DIR         Store processed files in DIR.
  --output-dir-mirror DIR       Store processed files in DIR, respecting original directory structure.
  --[no-]asyncio                Use asynchronous IO. [Default: Enabled]

  --[no-]check                  Add XXH64 integrity checksums during compression. [Default: Add, Validate]
                                If `-d` is present, ignore/validate checksums during decompression.

  --                            Treat remaining arguments after `--` as files.

Advanced compression options:
  --ultra                       Enable levels beyond 19, up to 22; requires more memory.
  --fast[=#]                    Use to very fast compression levels. [Default: 1]
  --adapt                       Dynamically adapt compression level to I/O conditions.
  --long[=#]                    Enable long distance matching with window log #. [Default: 27]
  --patch-from=REF              Use REF as the reference point for Zstandard's diff engine.

  -T#                           Spawn # compression threads. [Default: 1; pass 0 for core count.]
  --single-thread               Share a single thread for I/O and compression (slightly different than `-T1`).
  --auto-threads={physical|logical}
                                Use physical/logical cores when using `-T0`. [Default: Physical]

  -B#                           Set job size to #. [Default: 0 (automatic)]
  --rsyncable                   Compress using a rsync-friendly method (`-B` sets block size).

  --exclude-compressed          Only compress files that are not already compressed.

  --stream-size=#               Specify size of streaming input from STDIN.
  --size-hint=#                 Optimize compression parameters for streaming input of approximately size #.
  --target-compressed-block-size=#
                                Generate compressed blocks of approximately # size.

  --no-dictID                   Don't write `dictID` into the header (dictionary compression only).
  --[no-]compress-literals      Force (un)compressed literals.
  --[no-]row-match-finder       Explicitly enable/disable the fast, row-based matchfinder for
                                the 'greedy', 'lazy', and 'lazy2' strategies.

  --format=zstd                 Compress files to the `.zst` format. [Default]
  --[no-]mmap-dict              Memory-map dictionary file rather than mallocing and loading all at once

Advanced decompression options:
  -l                            Print information about Zstandard-compressed files.
  --test                        Test compressed file integrity.
  -M#                           Set the memory usage limit to # megabytes.
  --[no-]sparse                 Enable sparse mode. [Default: Enabled for files, disabled for STDOUT.]
  --[no-]pass-through           Pass through uncompressed files as-is. [Default: Disabled]

Dictionary builder:
  --train                       Create a dictionary from a training set of files.

  --train-cover[=k=#,d=#,steps=#,split=#,shrink[=#]]
                                Use the cover algorithm (with optional arguments).
  --train-fastcover[=k=#,d=#,f=#,steps=#,split=#,accel=#,shrink[=#]]
                                Use the fast cover algorithm (with optional arguments).

  --train-legacy[=s=#]          Use the legacy algorithm with selectivity #. [Default: 9]
  -o NAME                       Use NAME as dictionary name. [Default: dictionary]
  --maxdict=#                   Limit dictionary to specified size #. [Default: 112640]
  --dictID=#                    Force dictionary ID to #. [Default: Random]

Benchmark options:
  -b#                           Perform benchmarking with compression level #. [Default: 3]
  -e#                           Test all compression levels up to #; starting level is `-b#`. [Default: 1]
  -i#                           Set the minimum evaluation to time # seconds. [Default: 3]
  -B#                           Cut file into independent chunks of size #. [Default: No chunking]
  -S                            Output one benchmark result per input file. [Default: Consolidated result]
  -D dictionary                 Benchmark using dictionary
  --priority=rt                 Set process priority to real-time.
Options (52)
OptionDescriptionSource
-o OUTPUTWrite output to a single file, OUTPUT.help
-k, --keepPreserve INPUT file(s).help
--rmRemove INPUT file(s) after successful (de)compression.help
-#Desired compression level, where `#` is a number between 1 and 19;help
-d, --decompress, --uncompressPerform decompression.help + man
-D DICTUse DICT as the dictionary for compression or decompression.help
-f, --forceDisable input and output checks.help
-hDisplay short usage and exit.help
-H, --helpDisplay full help and exit.help
-V, --versionDisplay the program version and exit.help
-c, --stdoutWrite to STDOUT (even if it is a console) and keep the INPUT file(s).help
-v, --verboseEnable verbose output;help
-q, --quietSuppress warnings;help
--trace LOGLog tracing information to LOG.help
-rOperate recursively on directories.help
--filelist LISTRead a list of files to operate on from LIST.help
--output-dir-flat DIRStore processed files in DIR.help
--output-dir-mirror DIRStore processed files in DIR, respecting original directory structure.help
--ultraEnable levels beyond 19, up to 22;help
--fast #Use to very fast compression levels.help
--adaptDynamically adapt compression level to I/O conditions.help
--long #Enable long distance matching with window log #.help
--patch-from REFUse REF as the reference point for Zstandard's diff engine.help
-T#Spawn # compression threads.help
--single-threadShare a single thread for I/O and compression (slightly different than `-T1`).help
--auto-threads physical|logicalUse physical/logical cores when using `-T0`.help
-B#Set job size to #.help
--rsyncableCompress using a rsync-friendly method (`-B` sets block size).help
--exclude-compressedOnly compress files that are not already compressed.help
--stream-size #Specify size of streaming input from STDIN.help
--size-hint #Optimize compression parameters for streaming input of approximately size #.help
--target-compressed-block-size #Generate compressed blocks of approximately # size.help
--no-dictIDDon't write `dictID` into the header (dictionary compression only).help
--format zstdCompress files to the `.zst` format.help
-l, --listDisplay information related to a zstd compressed file, such as size, ratio, and checksum.help + man
--test, -tTest the integrity of compressed files.help + man
-M#Set the memory usage limit to # megabytes.help
--train FILESUse FILES as a training set to create a dictionary.help + man
--train-cover k=#Use the cover algorithm (with optional arguments).help
--train-fastcover k=#Use the fast cover algorithm (with optional arguments).help
--train-legacy s=#Use the legacy algorithm with selectivity #.help
--maxdict #Limit dictionary to specified size #.help
--dictID #Force dictionary ID to #.help
-b#Perform benchmarking with compression level #.help + man
-e#Test all compression levels up to #;help
-i#Set the minimum evaluation to time # seconds.help
-SOutput one benchmark result per input file.help
--priority rtSet process priority to real-time.help
-z, --compressCompress. (in the manual page but not in --help)man
-n, --no-namedo not store the original filename and timestamps when compressing a file. (in the manual page but not in --help)man
--bestalias to the option -9. (in the manual page but not in --help)man
--zstd wlog=23## -B#: (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.