summaryrefslogtreecommitdiffstats
path: root/lib/lz4hc.c
diff options
context:
space:
mode:
authorinikep <inikep@gmail.com>2016-09-02 20:59:18 (GMT)
committerinikep <inikep@gmail.com>2016-09-02 20:59:18 (GMT)
commit2cf32ef0f107d18c9779283b8bd1d56f0517dd39 (patch)
tree7a2845b5052b03ae73e04d4e21e4674bd6da27b9 /lib/lz4hc.c
parentc1864f69e87d68fe79420c9303ecf97eb66bc7c7 (diff)
downloadlz4-2cf32ef0f107d18c9779283b8bd1d56f0517dd39.zip
lz4-2cf32ef0f107d18c9779283b8bd1d56f0517dd39.tar.gz
lz4-2cf32ef0f107d18c9779283b8bd1d56f0517dd39.tar.bz2
-b# and -e# options from zstd
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r--lib/lz4hc.c7
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;