slightly improved HC compression ratio

This commit is contained in:
Yann Collet 2016-11-07 19:32:24 -08:00
parent e9089bcbe4
commit c7ab95faa5

View File

@ -332,11 +332,11 @@ FORCE_INLINE int LZ4HC_encodeSequence (
static int LZ4HC_compress_generic ( static int LZ4HC_compress_generic (
void* ctxvoid, void* const ctxvoid,
const char* source, const char* const source,
char* dest, char* const dest,
int inputSize, int const inputSize,
int maxOutputSize, int const maxOutputSize,
int compressionLevel, int compressionLevel,
limitedOutput_directive limit limitedOutput_directive limit
) )
@ -381,7 +381,7 @@ static int LZ4HC_compress_generic (
_Search2: _Search2:
if (ip+ml < mflimit) if (ip+ml < mflimit)
ml2 = LZ4HC_InsertAndGetWiderMatch(ctx, ip + ml - 2, ip + 1, matchlimit, ml, &ref2, &start2, maxNbAttempts); ml2 = LZ4HC_InsertAndGetWiderMatch(ctx, ip + ml - 2, ip + 0, matchlimit, ml, &ref2, &start2, maxNbAttempts);
else ml2 = ml; else ml2 = ml;
if (ml2 == ml) { /* No better match */ if (ml2 == ml) { /* No better match */