• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:without +full:- +full:zstd

1 zstd(1) -- zstd, zstdmt, unzstd, zstdcat - Compress or decompress .zst files
5 --------
7 `zstd` [<OPTIONS>] [-|<INPUT-FILE>] [-o <OUTPUT-FILE>]
9 `zstdmt` is equivalent to `zstd -T0`
11 `unzstd` is equivalent to `zstd -d`
13 `zstdcat` is equivalent to `zstd -dcf`
17 -----------
18 `zstd` is a fast lossless compression algorithm and data compression tool,
21 `zstd` offers highly configurable compression speed,
27 `zstd` command line syntax is generally similar to gzip,
30 - Source files are preserved by default.
31 It's possible to remove them automatically by using the `--rm` command.
32 - When compressing a single file, `zstd` displays progress notifications
34 Use `-q` to turn them off.
35 - `zstd` displays a short help page when command line is an error.
36 Use `-q` to turn it off.
37 - `zstd` does not accept input from console,
39 - `zstd` does not store the input's filename or attributes, only its contents.
41 `zstd` processes each _file_ according to the selected operation mode.
42 If no _files_ are given or _file_ is `-`, `zstd` reads from standard input
44 `zstd` will refuse to write compressed data to standard output
46 Similarly, `zstd` will refuse to read compressed data from standard input
49 Unless `--stdout` or `-o` is specified, _files_ are written to a new file
58 It is possible to concatenate multiple `.zst` files. `zstd` will decompress
62 -------
82 * `-z`, `--compress`:
86 (for example, `unzstd` implies `--decompress`).
87 * `-d`, `--decompress`, `--uncompress`:
89 * `-t`, `--test`:
91 This option is equivalent to `--decompress --stdout > /dev/null`,
94 * `-b#`:
97 * `--train FILES`:
101 * `-l`, `--list`:
102 Display information related to a zstd compressed file, such as size, ratio, and checksum.
104 This command's output can be augmented with the `-v` modifier.
108 * `-#`:
109 selects `#` compression level \[1-19\] (default: 3).
114 * `--ultra`:
117 * `--fast[=#]`:
118 switch to ultra-fast compression levels.
123 Similarly, if a compression level is set after `--fast`, it overrides it.
124 * `-T#`, `--threads=#`:
128 which is either 64 in 32-bit mode, or 256 for 64-bit environments.
129 This modifier does nothing if `zstd` is compiled without multithread support.
130 * `--single-thread`:
133 Single-thread mode features significantly lower memory usage,
134 which can be useful for systems with limited amount of memory, such as 32-bit systems.
138 … Note 2: this mode is different from `-T1`, which spawns 1 compression thread in parallel with I/O.
139 Final compressed result is also slightly different from `-T1`.
140 * `--auto-threads={physical,logical} (default: physical)`:
141 When using a default amount of threads via `-T0`, choose the default based on the number
143 * `--adapt[=min=#,max=#]`:
144 `zstd` will dynamically adapt compression level to perceived I/O conditions.
145 Compression level adaptation can be observed live by using command `-v`.
147 The feature works when combined with multi-threading and `--long` mode.
148 It does not work with `--single-thread`.
152 _Note_: at the time of this writing, `--adapt` can remain stuck at low speed
154 * `--long[=#]`:
162 Note: If `windowLog` is set to larger than 27, `--long=windowLog` or
163 `--memory=windowSize` needs to be passed to the decompressor.
164 * `-D DICT`:
166 * `--patch-from FILE`:
167 Specify the file to be used as a reference point for zstd's diff engine.
171 Note: cannot use both this and `-D` together.
173 Note: `--long` mode will be automatically activated if _chainLog_ < _fileLog_
177 Note: for all levels, you can use `--patch-from` in `--single-thread` mode
181 of speed by specifying `--zstd=targetLength=` to be something large
182 (i.e. 4096), and by setting a large `--zstd=chainLog=`.
183 * `--rsyncable`:
184 `zstd` will periodically synchronize the compression state to make the
185 compressed file more rsync-friendly.
188 for example when combining `--rsyncable` with many parallel worker threads.
189 This feature does not work with `--single-thread`. You probably don't want
192 * `-C`, `--[no-]check`:
194 * `--[no-]content-size`:
197 `--content-size` (meaning that the original size will be placed in the header).
198 * `--no-dictID`:
202 * `-M#`, `--memory=#`:
203 Set a memory usage limit. By default, `zstd` uses 128 MiB for decompression
208 This is also used during compression when using with `--patch-from=`. In this case,
212 overrides the default limit of 2 GiB. zstd will load training samples up to the memory limit
214 * `--stream-size=#`:
219 * `--size-hint=#`:
220 When handling input from a stream, `zstd` must guess how large the source size
226 * `--target-compressed-block-size=#`:
233 * `-f`, `--force`:
236 During decompression and when the output destination is stdout, pass-through
237 unrecognized formats as-is.
238 * `-c`, `--stdout`:
239 write to standard output (even if it is the console); keep original files (disable `--rm`).
240 * `-o FILE`:
242 Note that this operation is in conflict with `-c`.
244 * `--[no-]sparse`:
252 * `--[no-]pass-through`
253 enable / disable passing through uncompressed files as-is. During
254 decompression when pass-through is enabled, unrecognized formats will be
255 copied as-is from the input to the output. By default, pass-through will
256 occur when the output destination is stdout and the force (`-f`) option is
258 * `--rm`:
261 If used in combination with `-o`,
262 …triggers a confirmation prompt (which can be silenced with `-f`), as this is a destructive operati…
263 * `-k`, `--keep`:
266 * `-r`:
272 * `--filelist FILE`
275 * `--output-dir-flat DIR`:
281 while in combination with `-f`, the last file will be present instead.
282 * `--output-dir-mirror DIR`:
283 similar to `--output-dir-flat`,
289 it will be stored into the "output-dir/var/tmp/abc".
291 name collision resolution will follow the same rules as `--output-dir-flat`.
292 * `--format=FORMAT`:
294 support, zstd can compress to or decompress from other compression algorithm
295 formats. Possibly available options are `zstd`, `gzip`, `xz`, `lzma`, and `lz4`.
296 If no such format is provided, `zstd` is the default.
297 * `-h`/`-H`, `--help`:
299 * `-V`, `--version`:
301 note that, since it exits, flags specified after `-V` are effectively ignored.
302 Advanced: `-vV` also displays supported formats.
303 `-vvV` also displays POSIX support.
304 `-qV` will only display the version number, suitable for machine reading.
305 * `-v`, `--verbose`:
307 * `-q`, `--quiet`:
310 * `--no-progress`:
312 * `--show-default-cparams`:
315 * `--exclude-compressed`:
317 * `--`:
318 All arguments after `--` are treated as files
322 When invoked via a `gzip` symlink, `zstd` will support further
325 * `-n`, `--no-name`:
327 a file. This is the default behavior and hence a no-op.
328 * `--best`:
329 alias to the option `-9`.
342 `ZSTD_NBTHREADS` can be used to set the number of threads `zstd` will attempt to use during compres…
345 `zstd` must be compiled with multithread support for this variable to have any effect.
348 `-#` for compression level and `-T#` for number of compression threads.
352 ----------------------------
353 `zstd` provides 22 predefined regular compression levels plus the fast levels.
355 (one can observe the result of this translation with `--show-default-cparams`).
358 ### --zstd[=options]:
359 The _options_ are provided as a comma-separated list.
364 - `strategy`=_strat_, `strat`=_strat_:
372 - `windowLog`=_wlog_, `wlog`=_wlog_:
378 The minimum _wlog_ is 10 (1 KiB) and the maximum is 30 (1 GiB) on 32-bit
379 platforms and 31 (2 GiB) on 64-bit platforms.
381 Note: If `windowLog` is set to larger than 27, `--long=windowLog` or
382 `--memory=windowSize` needs to be passed to the decompressor.
384 - `hashLog`=_hlog_, `hlog`=_hlog_:
392 - `chainLog`=_clog_, `clog`=_clog_:
402 …m _clog_ is 6 (64 entries / 256 B) and the maximum is 29 (512M entries / 2 GiB) on 32-bit platforms
403 and 30 (1B entries / 4 GiB) on 64-bit platforms.
405 - `searchLog`=_slog_, `slog`=_slog_:
412 The minimum _slog_ is 1 and the maximum is 'windowLog' - 1.
414 - `minMatch`=_mml_, `mml`=_mml_:
422 - `targetLength`=_tlen_, `tlen`=_tlen_:
430 For `ZSTD_fast`, it triggers ultra-fast mode when > 0.
439 - `overlapLog`=_ovlog_, `ovlog`=_ovlog_:
449 Value 0 is special and means "default": _ovlog_ is automatically determined by `zstd`.
452 - `ldmHashLog`=_lhlog_, `lhlog`=_lhlog_:
462 - `ldmMinMatch`=_lmml_, `lmml`=_lmml_:
471 - `ldmBucketSizeLog`=_lblog_, `lblog`=_lblog_:
482 - `ldmHashRateLog`=_lhrlog_, `lhrlog`=_lhrlog_:
491 The default value is `wlog - lhlog`.
497 `--zstd`=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6
499 ### -B#:
501 This parameter is only available when multi-threading is enabled.
504 `-B#` makes it possible to manually select a custom size.
507 Different job sizes will lead to non-identical compressed frames.
511 ------------------
512 `zstd` offers _dictionary_ compression,
514 It's possible to train `zstd` with a set of samples,
517 using command `-D dictionaryFileName`.
520 * `--train FILEs`:
525 `--train` can be combined with `-r` to indicate a directory rather than listing all the files,
533 `--train` supports multithreading if `zstd` is compiled with threading support (default).
534 Additional advanced parameters can be specified with `--train-fastcover`.
535 The legacy dictionary builder can be accessed with `--train-legacy`.
536 The slower cover dictionary builder can be accessed with `--train-cover`.
537 Default `--train` is equivalent to `--train-fastcover=d=8,steps=4`.
539 * `-o FILE`:
541 * `--maxdict=#`:
546 * `-#`:
550 * `-B#`:
552 * `-M#`, `--memory=#`:
572 * `--dictID=#`:
575 By default, zstd will create a 4-bytes random number ID.
586 * `--train-cover[=k#,d=#,steps=#,split=#,shrink[=#]]`:
605 Supports multithreading if `zstd` is compiled with threading support.
612 `zstd --train-cover FILEs`
614 `zstd --train-cover=k=50,d=8 FILEs`
616 `zstd --train-cover=d=8,steps=500 FILEs`
618 `zstd --train-cover=k=50 FILEs`
620 `zstd --train-cover=k=50,split=60 FILEs`
622 `zstd --train-cover=shrink FILEs`
624 `zstd --train-cover=shrink=2 FILEs`
626 * `--train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#]`:
636 The subsegment is hashed to an index in the range [0,2^_f_ - 1].
642 `zstd --train-fastcover FILEs`
644 `zstd --train-fastcover=d=8,f=15,accel=2 FILEs`
646 * `--train-legacy[=selectivity=#]`:
651 `--train-legacy=s=#` is also accepted.
655 `zstd --train-legacy FILEs`
657 `zstd --train-legacy=selectivity=8 FILEs`
661 ---------
662 The `zstd` CLI provides a benchmarking mode that can be used to easily find suitable compression pa…
665 * `-b#`:
667 * `-e#`:
668 benchmark file(s) using multiple compression levels, from `-b#` to `-e#` (inclusive)
669 * `-d`:
670 benchmark decompression speed only (requires providing an already zstd-compressed content)
671 * `-i#`:
673 * `-B#`, `--block-size=#`:
675 * `--priority=rt`:
676 set process priority to real-time (Windows)
678 **Output Format:** CompressionLevel#Filename: InputSize -> OutputSize (CompressionRatio), Compressi…
680 …sion and decompression speed, the entire input is compressed/decompressed in-memory to measure spe…
684 --------
687 The <zstandard> format is specified in Y. Collet, "Zstandard Compression and the 'application/zstd'…
690 ----
691 Report bugs at: https://github.com/facebook/zstd/issues
694 ------