Allow negative compression levels in training

* Set `dictCLevel` in `zstdcli.c`.
* Only set to default level if the compression level `== 0`, not `<= 0`.
This commit is contained in:
Nick Terrell
2018-04-09 12:12:03 -07:00
parent daf3ab0aad
commit 569e2abccd
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -550,7 +550,9 @@ int main(int argCount, const char* argv[])
U32 fastLevel;
++argument;
fastLevel = readU32FromChar(&argument);
if (fastLevel) cLevel = - (int)fastLevel;
if (fastLevel) {
dictCLevel = cLevel = -(int)fastLevel;
}
} else if (*argument != 0) {
/* Invalid character following --fast */
CLEAN_RETURN(badusage(programName));