]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
removed direct assignment of 22, used ZSTD_maxCLevel() instead 779/head
authorPaul Cruz <paulcruz74@fb.com>
Mon, 7 Aug 2017 20:11:07 +0000 (13:11 -0700)
committerPaul Cruz <paulcruz74@fb.com>
Mon, 7 Aug 2017 20:11:07 +0000 (13:11 -0700)
contrib/adaptive-compression/adapt.c

index eeb4c2ea97f4e9608cc783278281a80b2251a10e..40ebb072212e2ea9946ea55339d86177640da117 100644 (file)
@@ -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);