Merge pull request #455 from terrelln/hc-default

[lz4hc] level == 0 means default, not level 1
This commit is contained in:
Yann Collet 2018-01-22 13:25:49 -08:00 committed by GitHub
commit 8258f4d9cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -728,7 +728,7 @@ void LZ4_resetStreamHC (LZ4_streamHC_t* LZ4_streamHCPtr, int compressionLevel)
void LZ4_setCompressionLevel(LZ4_streamHC_t* LZ4_streamHCPtr, int compressionLevel)
{
if (compressionLevel < 1) compressionLevel = 1;
if (compressionLevel < 1) compressionLevel = LZ4HC_CLEVEL_DEFAULT;
if (compressionLevel > LZ4HC_CLEVEL_MAX) compressionLevel = LZ4HC_CLEVEL_MAX;
LZ4_streamHCPtr->internal_donotuse.compressionLevel = compressionLevel;
}