added mode documentation on ZSTD_CLEVEL

providing range restriction [1-19] explicitly
partially answering #1829
This commit is contained in:
Yann Collet
2019-10-18 17:22:45 -07:00
parent 8e715d57c5
commit ca73c218be
5 changed files with 22 additions and 6 deletions
+6 -3
View File
@@ -173,10 +173,13 @@ Benchmark arguments :
``` ```
#### Restricted usage of Environment Variables #### Restricted usage of Environment Variables
Using environment variables to set compression/decompression parameters has security implications. Therefore, Using environment variables to set parameters has security implications.
we intentionally restrict its usage. Currently, only `ZSTD_CLEVEL` is supported for setting compression level. 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. If the value of `ZSTD_CLEVEL` is not a valid integer, it will be ignored with a warning message.
Note that command line options will override corresponding environment variable settings. `ZSTD_CLEVEL` just replaces the default compression level (`3`).
It can be overridden by corresponding command line arguments.
#### Long distance matching mode #### Long distance matching mode
The long distance matching mode, enabled with `--long`, is designed to improve The long distance matching mode, enabled with `--long`, is designed to improve
+4 -1
View File
@@ -1,5 +1,5 @@
. .
.TH "ZSTD" "1" "September 2019" "zstd 1.4.4" "User Commands" .TH "ZSTD" "1" "October 2019" "zstd 1.4.4" "User Commands"
. .
.SH "NAME" .SH "NAME"
\fBzstd\fR \- zstd, zstdmt, unzstd, zstdcat \- Compress or decompress \.zst files \fBzstd\fR \- zstd, zstdmt, unzstd, zstdcat \- Compress or decompress \.zst files
@@ -206,6 +206,9 @@ add integrity check computed from uncompressed data (default: enabled)
\fB\-\-\fR \fB\-\-\fR
All arguments after \fB\-\-\fR are treated as files All arguments after \fB\-\-\fR are treated as files
. .
.SS "Restricted usage of Environment Variables"
Using environment variables to set parameters has security implications\. Therefore, this avenue is intentionally restricted\. Only \fBZSTD_CLEVEL\fR is supported currently, for setting compression level\. \fBZSTD_CLEVEL\fR can be used to set the level between 1 and 19 (the "normal" range)\. If the value of \fBZSTD_CLEVEL\fR is not a valid integer, it will be ignored with a warning message\. \fBZSTD_CLEVEL\fR just replaces the default compression level (\fB3\fR)\. It can be overridden by corresponding command line arguments\.
.
.SH "DICTIONARY BUILDER" .SH "DICTIONARY BUILDER"
\fBzstd\fR offers \fIdictionary\fR compression, which greatly improves efficiency on small files and messages\. It\'s possible to train \fBzstd\fR with a set of samples, the result of which is saved into a file called a \fBdictionary\fR\. Then during compression and decompression, reference the same dictionary, using command \fB\-D dictionaryFileName\fR\. Compression of small files similar to the sample set will be greatly improved\. \fBzstd\fR offers \fIdictionary\fR compression, which greatly improves efficiency on small files and messages\. It\'s possible to train \fBzstd\fR with a set of samples, the result of which is saved into a file called a \fBdictionary\fR\. Then during compression and decompression, reference the same dictionary, using command \fB\-D dictionaryFileName\fR\. Compression of small files similar to the sample set will be greatly improved\.
. .
+10
View File
@@ -214,6 +214,16 @@ the last one takes effect.
* `--`: * `--`:
All arguments after `--` are treated as files 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 DICTIONARY BUILDER
------------------ ------------------
+1 -1
View File
@@ -1,5 +1,5 @@
. .
.TH "ZSTDGREP" "1" "September 2019" "zstd 1.4.4" "User Commands" .TH "ZSTDGREP" "1" "October 2019" "zstd 1.4.4" "User Commands"
. .
.SH "NAME" .SH "NAME"
\fBzstdgrep\fR \- print lines matching a pattern in zstandard\-compressed files \fBzstdgrep\fR \- print lines matching a pattern in zstandard\-compressed files
+1 -1
View File
@@ -1,5 +1,5 @@
. .
.TH "ZSTDLESS" "1" "September 2019" "zstd 1.4.4" "User Commands" .TH "ZSTDLESS" "1" "October 2019" "zstd 1.4.4" "User Commands"
. .
.SH "NAME" .SH "NAME"
\fBzstdless\fR \- view zstandard\-compressed files \fBzstdless\fR \- view zstandard\-compressed files