summaryrefslogtreecommitdiff
path: root/programs/zstd.1.md
diff options
context:
space:
mode:
Diffstat (limited to 'programs/zstd.1.md')
-rw-r--r--programs/zstd.1.md57
1 files changed, 41 insertions, 16 deletions
diff --git a/programs/zstd.1.md b/programs/zstd.1.md
index 9e4c5d305550..2e2dc54f8668 100644
--- a/programs/zstd.1.md
+++ b/programs/zstd.1.md
@@ -115,11 +115,25 @@ the last one takes effect.
Note: If `windowLog` is set to larger than 27, `--long=windowLog` or
`--memory=windowSize` needs to be passed to the decompressor.
+* `--fast[=#]`:
+ switch to ultra-fast compression levels.
+ If `=#` is not present, it defaults to `1`.
+ The higher the value, the faster the compression speed,
+ at the cost of some compression ratio.
+ This setting overwrites compression level if one was set previously.
+ Similarly, if a compression level is set after `--fast`, it overrides it.
+
* `-T#`, `--threads=#`:
- Compress using `#` threads (default: 1).
+ Compress using `#` working threads (default: 1).
If `#` is 0, attempt to detect and use the number of physical CPU cores.
- In all cases, the nb of threads is capped to ZSTDMT_NBTHREADS_MAX==256.
+ In all cases, the nb of threads is capped to ZSTDMT_NBTHREADS_MAX==200.
This modifier does nothing if `zstd` is compiled without multithread support.
+* `--single-thread`:
+ Does not spawn a thread for compression, use caller thread instead.
+ This is the only available mode when multithread support is disabled.
+ In this mode, compression is serialized with I/O.
+ (This is different from `-T1`, which spawns 1 compression thread in parallel of I/O).
+ Single-thread mode also features lower memory usage.
* `-D file`:
use `file` as Dictionary to compress or decompress FILE(s)
* `--nodictID`:
@@ -137,7 +151,7 @@ the last one takes effect.
to make files with many zeroes smaller on disk.
Creating sparse files may save disk space and speed up decompression by
reducing the amount of disk I/O.
- default : enabled when output is into a file,
+ default: enabled when output is into a file,
and disabled when output is stdout.
This setting overrides default and can force sparse mode over stdout.
* `--rm`:
@@ -163,7 +177,7 @@ the last one takes effect.
suppress warnings, interactivity, and notifications.
specify twice to suppress errors too.
* `-C`, `--[no-]check`:
- add integrity check computed from uncompressed data (default : enabled)
+ add integrity check computed from uncompressed data (default: enabled)
* `--`:
All arguments after `--` are treated as files
@@ -171,12 +185,12 @@ the last one takes effect.
DICTIONARY BUILDER
------------------
`zstd` offers _dictionary_ compression,
-useful for very small files and messages.
-It's possible to train `zstd` with some samples,
+which greatly improves efficiency on small files and messages.
+It's possible to train `zstd` with a set of 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).
+Then during compression and decompression, reference the same dictionary,
+using command `-D dictionaryFileName`.
+Compression of small files similar to the sample set will be greatly improved.
* `--train FILEs`:
Use FILEs as training set to create a dictionary.
@@ -192,6 +206,10 @@ Typical gains range from 10% (at 64KB) to x5 better (at <1KB).
Dictionary saved into `file` (default name: dictionary).
* `--maxdict=#`:
Limit dictionary to specified size (default: 112640).
+* `-#`:
+ Use `#` compression level during training (optional).
+ Will generate statistics more tuned for selected compression level,
+ resulting in a _small_ compression ratio improvement for this level.
* `-B#`:
Split input files in blocks of size # (default: no split)
* `--dictID=#`:
@@ -252,7 +270,7 @@ BENCHMARK
* `-e#`:
benchmark file(s) using multiple compression levels, from `-b#` to `-e#` (inclusive)
* `-i#`:
- minimum evaluation time, in seconds (default : 3s), benchmark mode only
+ minimum evaluation time, in seconds (default: 3s), benchmark mode only
* `-B#`, `--block-size=#`:
cut file(s) into independent blocks of size # (default: no block)
* `--priority=rt`:
@@ -329,14 +347,21 @@ The list of available _options_:
The minimum _slen_ is 3 and the maximum is 7.
- `targetLen`=_tlen_, `tlen`=_tlen_:
- Specify the minimum match length that causes a match finder to stop
- searching for better matches.
+ The impact of this field vary depending on selected strategy.
+
+ For ZSTD\_btopt and ZSTD\_btultra, it specifies the minimum match length
+ that causes match finder to stop searching for better matches.
+ A larger `targetLen` usually improves compression ratio
+ but decreases compression speed.
+
+ For ZSTD\_fast, it specifies
+ the amount of data skipped between match sampling.
+ Impact is reversed : a larger `targetLen` increases compression speed
+ but decreases compression ratio.
- A larger minimum match length usually improves compression ratio but
- decreases compression speed.
- This option is only used with strategies ZSTD_btopt and ZSTD_btultra.
+ For all other strategies, this field has no impact.
- The minimum _tlen_ is 4 and the maximum is 999.
+ The minimum _tlen_ is 1 and the maximum is 999.
- `overlapLog`=_ovlog_, `ovlog`=_ovlog_:
Determine `overlapSize`, amount of data reloaded from previous job.