1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

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:09:28 -07:00
parent daf3ab0aad
commit 569e2abccd
2 changed files with 6 additions and 4 deletions

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));