Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use ZSTD_MAX_CLEVEL and ZSTD_CLEVEL_DEFAULT for compression level #137

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

okravets
Copy link

use ZSTD_MAX_CLEVEL and ZSTD_CLEVEL_DEFAULT macro for compression levels

@rdoeffinger
Copy link
Contributor

I don't think this can work, there seems to be no ZSTD_MAX_CLEVEL in any of the zstd.h headers I can find (e.g. in Ubuntu or in the zstd project).
Instead there is the ZSTD_maxCLevel function call, however that cannot be used in this context.
Even the ZSTD_CLEVEL_DEFAULT should be checked since old versions did not have that either.
Also does it really matter? 19 is much slower than most will find acceptable anyway, and it is compatible with most versions.
I don't think it prevents anyone from using 22 manually (or even calling ZSTD_maxCLevel) if really keen on it.
It seems to me the current code is a reasonable abstraction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants