minor opt

dev
Yann Collet 2016-10-14 16:03:34 -07:00
parent 70077bc9bb
commit 2b361cf2f1
4 changed files with 6 additions and 6 deletions

2
NEWS
View File

@ -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

View 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);

View 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 */

View 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: