Merge pull request #4606 from jlee303/update_manual

Update manual/error message
This commit is contained in:
Yann Collet
2026-03-13 10:37:36 -07:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -131,6 +131,7 @@ the last one takes effect.
In all cases, the nb of threads is capped to `ZSTDMT_NBWORKERS_MAX`, In all cases, the nb of threads is capped to `ZSTDMT_NBWORKERS_MAX`,
which is either 64 in 32-bit mode, or 256 for 64-bit environments. which is either 64 in 32-bit mode, or 256 for 64-bit environments.
This modifier does nothing if `zstd` is compiled without multithread support. This modifier does nothing if `zstd` is compiled without multithread support.
Note that memory usage increases with each thread.
* `--single-thread`: * `--single-thread`:
Use a single thread for both I/O and compression. Use a single thread for both I/O and compression.
As compression is serialized with I/O, this can be slightly slower. As compression is serialized with I/O, this can be slightly slower.
@@ -157,7 +158,7 @@ the last one takes effect.
when combined with multiple worker threads (>=2). when combined with multiple worker threads (>=2).
* `--long[=#]`: * `--long[=#]`:
enables long distance matching with `#` `windowLog`, if `#` is not enables long distance matching with `#` `windowLog`, if `#` is not
present it defaults to `27`. present it defaults to `27`. The highest possible value is 31.
This increases the window size (`windowLog`) and memory usage for both the This increases the window size (`windowLog`) and memory usage for both the
compressor and decompressor. compressor and decompressor.
This setting is designed to improve the compression ratio for files with This setting is designed to improve the compression ratio for files with
+6 -1
View File
@@ -1556,7 +1556,12 @@ int main(int argCount, const char* argv[])
/* check compression level limits */ /* check compression level limits */
{ int const maxCLevel = ultra ? ZSTD_maxCLevel() : ZSTDCLI_CLEVEL_MAX; { int const maxCLevel = ultra ? ZSTD_maxCLevel() : ZSTDCLI_CLEVEL_MAX;
if (cLevel > maxCLevel) { if (cLevel > maxCLevel) {
DISPLAYLEVEL(2, "Warning : compression level higher than max, reduced to %i \n", maxCLevel); DISPLAYLEVEL(2, "Warning : compression level higher than max, reduced to %i. ", maxCLevel);
DISPLAYLEVEL(2, "Specify --ultra to raise the limit to 22 and use "
"--long=31 for maximum compression. Note that this "
"requires high amounts of memory, and the resulting data "
"might be rejected by third-party decoders and is "
"therefore only recommended for archival purposes. \n");
cLevel = maxCLevel; cLevel = maxCLevel;
} } } }
#endif #endif