From e100a311ebb88e59f1bf155f0a31f22ba04e172b Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Mon, 7 Aug 2017 13:11:07 -0700 Subject: [PATCH] removed direct assignment of 22, used ZSTD_maxCLevel() instead --- contrib/adaptive-compression/adapt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/adaptive-compression/adapt.c b/contrib/adaptive-compression/adapt.c index eeb4c2ea..40ebb072 100644 --- a/contrib/adaptive-compression/adapt.c +++ b/contrib/adaptive-compression/adapt.c @@ -43,7 +43,7 @@ static unsigned g_useProgressBar = 1; static UTIL_freq_t g_ticksPerSecond; static unsigned g_forceCompressionLevel = 0; static unsigned g_minCLevel = 1; -static unsigned g_maxCLevel = 22; +static unsigned g_maxCLevel; typedef struct { void* start; @@ -993,7 +993,7 @@ static void help(void) PRINT(" -p : hide progress bar\n"); PRINT(" -q : quiet mode -- do not show progress bar or other information\n"); PRINT(" -l# : provide lower bound for compression level -- default 1\n"); - PRINT(" -u# : provide upper bound for compression level -- default 22\n"); + PRINT(" -u# : provide upper bound for compression level -- default %u\n", ZSTD_maxCLevel()); } /* return 0 if successful, else return error */ int main(int argCount, const char* argv[]) @@ -1006,6 +1006,7 @@ int main(int argCount, const char* argv[]) int ret = 0; int argNum; filenameTable[0] = stdinmark; + g_maxCLevel = ZSTD_maxCLevel(); UTIL_initTimer(&g_ticksPerSecond);