]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Displaying level in --show-default-cparams (#1991)
authorBimba Shrestha <bimbashrestha@fb.com>
Thu, 6 Feb 2020 21:51:43 +0000 (13:51 -0800)
committerGitHub <noreply@github.com>
Thu, 6 Feb 2020 21:51:43 +0000 (13:51 -0800)
* Displaying level in --show-default-cparams

* Displaying actual enum value instead of level

programs/zstdcli.c

index 341f38cb254845ca1112c0666b29a72b06cdfc0d..3ebecadcab2ae0fcdba722ed0c8db19d12c20483 100644 (file)
@@ -1240,13 +1240,13 @@ int main(int const argCount, const char* argv[])
                 const ZSTD_compressionParameters cParams = ZSTD_getCParams(cLevel, fileSize, dictSize);
                 if (fileSize != UTIL_FILESIZE_UNKNOWN) DISPLAY("%s (%u bytes)\n", filenames->fileNames[fileNb], (unsigned)fileSize);
                 else DISPLAY("%s (src size unknown)\n", filenames->fileNames[fileNb]);
-                DISPLAY(" - windowLog    : %u\n", cParams.windowLog);
-                DISPLAY(" - chainLog     : %u\n", cParams.chainLog);
-                DISPLAY(" - searchLog    : %u\n", cParams.searchLog);
-                DISPLAY(" - minMatch     : %u\n", cParams.minMatch);
-                DISPLAY(" - targetLength : %u\n", cParams.targetLength);
+                DISPLAY(" - windowLog     : %u\n", cParams.windowLog);
+                DISPLAY(" - chainLog      : %u\n", cParams.chainLog);
+                DISPLAY(" - searchLog     : %u\n", cParams.searchLog);
+                DISPLAY(" - minMatch      : %u\n", cParams.minMatch);
+                DISPLAY(" - targetLength  : %u\n", cParams.targetLength);
                 assert(cParams.strategy < ZSTD_NB_STRATEGIES + 1);
-                DISPLAY(" - strategy     : %s\n", ZSTD_strategyMap[(int)cParams.strategy]);
+                DISPLAY(" - strategy      : %s (%u)\n", ZSTD_strategyMap[(int)cParams.strategy], (unsigned)cParams.strategy);
             }
         }