Zstd: Change default compression level

Created on 6 Nov 2019  路  3Comments  路  Source: facebook/zstd

How can I change default compression level to 5 or other value when compiling zstd?

All 3 comments

You can change your environment variable ZSTD_CLEVEL to something else with something like export ZSTD_CLEVEL=5, see: https://github.com/facebook/zstd/blob/dev/programs/README.md#restricted-usage-of-environment-variables

You can define your own ZSTD_CLEVEL_DEFAULT during compilation. Just add -D ZSTD_CLEVEL_DEFAULT=5 to your CPPFLAGS.

@terrelln
CPPFLAGS="-D ZSTD_CLEVEL_DEFAULT=5" don't work.

CPPFLAGS="-DZSTD_CLEVEL=5 -DZSTDCLI_CLEVEL_DEFAULT=5" , this works!

Was this page helpful?
0 / 5 - 0 ratings