From: Yann Collet Date: Fri, 14 Oct 2016 23:03:34 +0000 (-0700) Subject: minor opt X-Git-Tag: v1.1.1~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b361cf2f1b5b461e93357eb4a1cafed6e2bcfeb;p=thirdparty%2Fzstd.git minor opt --- diff --git a/NEWS b/NEWS index 1b65b508c..a9454b40b 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ v1.1.1 -New : command -M, to limit allowed memory consumption +New : command -M#, --memory=, --memlimit=, --memlimit-decompress= to limit allowed memory consumption v1.1.0 New : contrib/pzstd, parallel version of zstd, by Nick Terrell diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index e53ecc5fd..e71873b03 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -1458,7 +1458,7 @@ static U32 ZSTD_insertBt1(ZSTD_CCtx* zc, const BYTE* const ip, const U32 mls, co const U32 dictLimit = zc->dictLimit; const BYTE* const dictEnd = dictBase + dictLimit; const BYTE* const prefixStart = base + dictLimit; - const BYTE* match = base + matchIndex; + const BYTE* match; const U32 current = (U32)(ip-base); const U32 btLow = btMask >= current ? 0 : current - btMask; U32* smallerPtr = bt + 2*(current&btMask); diff --git a/lib/compress/zstd_opt.h b/lib/compress/zstd_opt.h index cb5872908..cea67056a 100644 --- a/lib/compress/zstd_opt.h +++ b/lib/compress/zstd_opt.h @@ -401,7 +401,7 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx, ZSTD_rescaleFreqs(seqStorePtr); ip += (ip==prefixStart); { U32 i; for (i=0; irep[i]; } - inr = ip; + //inr = ip; /* Match Loop */ while (ip < ilimit) { @@ -657,7 +657,7 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx, ctx->nextToUpdate3 = ctx->nextToUpdate; ZSTD_rescaleFreqs(seqStorePtr); ip += (ip==prefixStart); - inr = ip; + //inr = ip; /* Match Loop */ while (ip < ilimit) { @@ -666,7 +666,7 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx, U32 current = (U32)(ip-base); memset(opt, 0, sizeof(ZSTD_optimal_t)); last_pos = 0; - inr = ip; + //inr = ip; opt[0].litlen = (U32)(ip - anchor); /* check repCode */ diff --git a/lib/dictBuilder/zdict.c b/lib/dictBuilder/zdict.c index 47a82af14..a88e70520 100644 --- a/lib/dictBuilder/zdict.c +++ b/lib/dictBuilder/zdict.c @@ -811,7 +811,7 @@ static size_t ZDICT_analyzeEntropy(void* dstBuffer, size_t maxDstSize, MEM_writeLE32(dstPtr+4, repStartValue[1]); MEM_writeLE32(dstPtr+8, repStartValue[2]); #endif - dstPtr += 12; + //dstPtr += 12; eSize += 12; _cleanup: