From: Yann Collet Date: Sat, 19 Oct 2019 00:22:45 +0000 (-0700) Subject: added mode documentation on ZSTD_CLEVEL X-Git-Tag: v1.4.4~1^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca73c218be4793acef114ad6154cca772b3540c5;p=thirdparty%2Fzstd.git added mode documentation on ZSTD_CLEVEL providing range restriction [1-19] explicitly partially answering #1829 --- diff --git a/programs/README.md b/programs/README.md index c3a5590d6..7668d49a2 100644 --- a/programs/README.md +++ b/programs/README.md @@ -173,10 +173,13 @@ Benchmark arguments : ``` #### Restricted usage of Environment Variables -Using environment variables to set compression/decompression parameters has security implications. Therefore, -we intentionally restrict its usage. Currently, only `ZSTD_CLEVEL` is supported for setting compression level. +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. -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 The long distance matching mode, enabled with `--long`, is designed to improve diff --git a/programs/zstd.1 b/programs/zstd.1 index bb5103c61..1072c3233 100644 --- a/programs/zstd.1 +++ b/programs/zstd.1 @@ -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" \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 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" \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\. . diff --git a/programs/zstd.1.md b/programs/zstd.1.md index dff4d9eac..c1f321bc0 100644 --- a/programs/zstd.1.md +++ b/programs/zstd.1.md @@ -214,6 +214,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 ------------------ diff --git a/programs/zstdgrep.1 b/programs/zstdgrep.1 index 06927ab78..b97f8cabc 100644 --- a/programs/zstdgrep.1 +++ b/programs/zstdgrep.1 @@ -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" \fBzstdgrep\fR \- print lines matching a pattern in zstandard\-compressed files diff --git a/programs/zstdless.1 b/programs/zstdless.1 index d49042276..1ecc8bdc5 100644 --- a/programs/zstdless.1 +++ b/programs/zstdless.1 @@ -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" \fBzstdless\fR \- view zstandard\-compressed files