aboutsummaryrefslogtreecommitdiff
path: root/programs/zstd.1.md
diff options
context:
space:
mode:
Diffstat (limited to 'programs/zstd.1.md')
-rw-r--r--programs/zstd.1.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/programs/zstd.1.md b/programs/zstd.1.md
index 3ab2667a0483e..e3daa4c87ac7f 100644
--- a/programs/zstd.1.md
+++ b/programs/zstd.1.md
@@ -144,6 +144,18 @@ the last one takes effect.
Due to the chaotic nature of dynamic adaptation, compressed result is not reproducible.
_note_ : at the time of this writing, `--adapt` can remain stuck at low speed
when combined with multiple worker threads (>=2).
+* `--stream-size=#` :
+ Sets the pledged source size of input coming from a stream. This value must be exact, as it
+ will be included in the produced frame header. Incorrect stream sizes will cause an error.
+ This information will be used to better optimize compression parameters, resulting in
+ better and potentially faster compression, especially for smaller source sizes.
+* `--size-hint=#`:
+ When handling input from a stream, `zstd` must guess how large the source size
+ will be when optimizing compression parameters. If the stream size is relatively
+ small, this guess may be a poor one, resulting in a higher compression ratio than
+ expected. This feature allows for controlling the guess when needed.
+ Exact guesses result in better compression ratios. Overestimates result in slightly
+ degraded compression ratios, while underestimates may result in significant degradation.
* `--rsyncable` :
`zstd` will periodically synchronize the compression state to make the
compressed file more rsync-friendly. There is a negligible impact to
@@ -179,6 +191,13 @@ the last one takes effect.
This is the default behavior.
* `-r`:
operate recursively on directories
+* `--output-dir-flat[=dir]`:
+ resulting files are stored into target `dir` directory,
+ instead of same directory as origin file.
+ Be aware that this command can introduce name collision issues,
+ if multiple files, from different directories, end up having the same name.
+ Collision resolution ensures first file with a given name will be present in `dir`,
+ while in combination with `-f`, the last file will be present instead.
* `--format=FORMAT`:
compress and decompress in other formats. If compiled with
support, zstd can compress to or decompress from other compression algorithm
@@ -202,6 +221,16 @@ the last one takes effect.
* `--`:
All arguments after `--` are treated as files
+### Restricted usage of Environment Variables
+
+Using environment variables to set parameters has security implications.
+Therefore, this avenue is intentionally restricted.
+Only `ZSTD_CLEVEL` is supported currently, for setting compression level.
+`ZSTD_CLEVEL` can be used to set the level between 1 and 19 (the "normal" range).
+If the value of `ZSTD_CLEVEL` is not a valid integer, it will be ignored with a warning message.
+`ZSTD_CLEVEL` just replaces the default compression level (`3`).
+It can be overridden by corresponding command line arguments.
+
DICTIONARY BUILDER
------------------