Skip to content

Commit c84c8fb

Browse files
authored
Merge pull request #4606 from jlee303/update_manual
Update manual/error message
2 parents ff25783 + 7b04e6d commit c84c8fb

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

programs/zstd.1.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ the last one takes effect.
131131
In all cases, the nb of threads is capped to `ZSTDMT_NBWORKERS_MAX`,
132132
which is either 64 in 32-bit mode, or 256 for 64-bit environments.
133133
This modifier does nothing if `zstd` is compiled without multithread support.
134+
Note that memory usage increases with each thread.
134135
* `--single-thread`:
135136
Use a single thread for both I/O and compression.
136137
As compression is serialized with I/O, this can be slightly slower.
@@ -157,7 +158,7 @@ the last one takes effect.
157158
when combined with multiple worker threads (>=2).
158159
* `--long[=#]`:
159160
enables long distance matching with `#` `windowLog`, if `#` is not
160-
present it defaults to `27`.
161+
present it defaults to `27`. The highest possible value is 31.
161162
This increases the window size (`windowLog`) and memory usage for both the
162163
compressor and decompressor.
163164
This setting is designed to improve the compression ratio for files with

programs/zstdcli.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,12 @@ int main(int argCount, const char* argv[])
15561556
/* check compression level limits */
15571557
{ int const maxCLevel = ultra ? ZSTD_maxCLevel() : ZSTDCLI_CLEVEL_MAX;
15581558
if (cLevel > maxCLevel) {
1559-
DISPLAYLEVEL(2, "Warning : compression level higher than max, reduced to %i \n", maxCLevel);
1559+
DISPLAYLEVEL(2, "Warning : compression level higher than max, reduced to %i. ", maxCLevel);
1560+
DISPLAYLEVEL(2, "Specify --ultra to raise the limit to 22 and use "
1561+
"--long=31 for maximum compression. Note that this "
1562+
"requires high amounts of memory, and the resulting data "
1563+
"might be rejected by third-party decoders and is "
1564+
"therefore only recommended for archival purposes. \n");
15601565
cLevel = maxCLevel;
15611566
} }
15621567
#endif

0 commit comments

Comments
 (0)