diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2016-09-02 22:21:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-02 22:21:51 (GMT) |
commit | f4111cf04e597c22814d7d585ce7282eb50f54d8 (patch) | |
tree | 92c782d188b7cd1c4b30b85f896b2a1d779c5fe1 /lib/lz4hc.c | |
parent | 7f08131f9986f0c19f2683d023d1cd9fdab41e32 (diff) | |
parent | b3ae49c7bf3652a37ba42095b9f1177c0eff49e3 (diff) | |
download | lz4-f4111cf04e597c22814d7d585ce7282eb50f54d8.zip lz4-f4111cf04e597c22814d7d585ce7282eb50f54d8.tar.gz lz4-f4111cf04e597c22814d7d585ce7282eb50f54d8.tar.bz2 |
Merge pull request #231 from inikep/dev
-b# and -e# options from zstd
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r-- | lib/lz4hc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c index 80bfa39..8bcebc8 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -37,7 +37,6 @@ /* ************************************* * Tuning Parameter ***************************************/ -static const int LZ4HC_compressionLevel_default = 9; /*! * HEAPMODE : @@ -86,8 +85,6 @@ static const int LZ4HC_compressionLevel_default = 9; #define OPTIMAL_ML (int)((ML_MASK-1)+MINMATCH) -static const int g_maxCompressionLevel = 16; - /************************************** * Local Types @@ -371,8 +368,8 @@ static int LZ4HC_compress_generic ( /* init */ - if (compressionLevel > g_maxCompressionLevel) compressionLevel = g_maxCompressionLevel; - if (compressionLevel < 1) compressionLevel = LZ4HC_compressionLevel_default; + if (compressionLevel > LZ4HC_MAX_CLEVEL) compressionLevel = LZ4HC_MAX_CLEVEL; + if (compressionLevel < 1) compressionLevel = LZ4HC_DEFAULT_CLEVEL; maxNbAttempts = 1 << (compressionLevel-1); ctx->end += inputSize; |