]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
minor opt
authorYann Collet <cyan@fb.com>
Fri, 14 Oct 2016 23:03:34 +0000 (16:03 -0700)
committerYann Collet <cyan@fb.com>
Fri, 14 Oct 2016 23:09:07 +0000 (16:09 -0700)
NEWS
lib/compress/zstd_compress.c
lib/compress/zstd_opt.h
lib/dictBuilder/zdict.c

diff --git a/NEWS b/NEWS
index 1b65b508c0f5abf569a5f7fe1bd8863207ea91f1..a9454b40ba016a05f3b55dcb086621d89b6de8f0 100644 (file)
--- 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
index e53ecc5fdd2d4235e4ac5dd0cc340f3f26647326..e71873b03f55b844becf2ac2c9015441629a3529 100644 (file)
@@ -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);
index cb5872908f24cfc75a7b030a137611b46147670f..cea67056a570bcb79838a215fc971e65b559304d 100644 (file)
@@ -401,7 +401,7 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx,
     ZSTD_rescaleFreqs(seqStorePtr);
     ip += (ip==prefixStart);
     { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) rep[i]=ctx->rep[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 */
index 47a82af14b4cdf9049aed6d0290e1c0748ff09ad..a88e7052088f0d5fb79cfa6e1c5100c00f89e887 100644 (file)
@@ -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: