facebook / facebook/zstd

Manual and error message improvements

Open
#4,521 0 comments 1 reaction 0 assignees View on GitHub
documentation
Dominant language
C
Stars
27.9k
Forks
2.6k
Avg merge
1d 3h
Merged PRs (30d)
8

Description

I have some suggestions to improve the manual (`man zstd`) and an error message.

After this manual section:

~~~
• -T#, --threads=#: Compress using # working threads (default: 1). If # is 0, attempt to detect and use the number of physical CPU cores. In all cases, the nb of threads is capped to ZSTDMT_NBWORKERS_MAX==200. This modifier does nothing if zstd is compiled without multithread support.
~~~

I suggest adding this note:

~~~
Note that memory usage increases with each thread.
~~~

It might seem obvious to some, but still worth noting for those who don't know, to spare them the surprise.

Also, after the error message "`Warning : compression level higher than max, reduced to 19`", I suggest adding "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." This explanation is taken from #435. I suggest mentioning `--long` because someone who uses `-22` probably intends to maximize the compression ratio, and they might not be aware that the `--long` option exists.

After

~~~
--long[=#]: enables long distance matching with # windowLog, if not # is not present it defaults to 27.
~~~

Please add "`The highest possible value is 31.`"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.