Lines Matching +full:1 +full:ms
15 void ZSTD_fillDoubleHashTable(ZSTD_matchState_t* ms, in ZSTD_fillDoubleHashTable() argument
18 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_fillDoubleHashTable()
19 U32* const hashLarge = ms->hashTable; in ZSTD_fillDoubleHashTable()
22 U32* const hashSmall = ms->chainTable; in ZSTD_fillDoubleHashTable()
24 const BYTE* const base = ms->window.base; in ZSTD_fillDoubleHashTable()
25 const BYTE* ip = base + ms->nextToUpdate; in ZSTD_fillDoubleHashTable()
33 for (; ip + fastHashFillStep - 1 <= iend; ip += fastHashFillStep) { in ZSTD_fillDoubleHashTable()
52 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_doubleFast_noDict_generic() argument
55 ZSTD_compressionParameters const* cParams = &ms->cParams; in ZSTD_compressBlock_doubleFast_noDict_generic()
56 U32* const hashLong = ms->hashTable; in ZSTD_compressBlock_doubleFast_noDict_generic()
58 U32* const hashSmall = ms->chainTable; in ZSTD_compressBlock_doubleFast_noDict_generic()
60 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_doubleFast_noDict_generic()
65 const U32 prefixLowestIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_doubleFast_noDict_generic()
69 U32 offset_1=rep[0], offset_2=rep[1]; in ZSTD_compressBlock_doubleFast_noDict_generic()
77 const size_t kStepIncr = 1 << kSearchStrength; in ZSTD_compressBlock_doubleFast_noDict_generic()
101 U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, current, cParams->windowLog); in ZSTD_compressBlock_doubleFast_noDict_generic()
108 while (1) { in ZSTD_compressBlock_doubleFast_noDict_generic()
109 step = 1; in ZSTD_compressBlock_doubleFast_noDict_generic()
131 if ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1))) { in ZSTD_compressBlock_doubleFast_noDict_generic()
132 mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; in ZSTD_compressBlock_doubleFast_noDict_generic()
145 …while (((ip>anchor) & (matchl0>prefixLowest)) && (ip[-1] == matchl0[-1])) { ip--; matchl0--; mLeng… in ZSTD_compressBlock_doubleFast_noDict_generic()
180 rep[1] = offset_2 ? offset_2 : offsetSaved; in ZSTD_compressBlock_doubleFast_noDict_generic()
187 /* check prefix long +1 match */ in ZSTD_compressBlock_doubleFast_noDict_generic()
193 …while (((ip>anchor) & (matchl1>prefixLowest)) && (ip[-1] == matchl1[-1])) { ip--; matchl1--; mLeng… in ZSTD_compressBlock_doubleFast_noDict_generic()
198 /* if no long +1 match, explore the short match we found */ in ZSTD_compressBlock_doubleFast_noDict_generic()
201 …while (((ip>anchor) & (matchs0>prefixLowest)) && (ip[-1] == matchs0[-1])) { ip--; matchs0--; mLeng… in ZSTD_compressBlock_doubleFast_noDict_generic()
234 hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); in ZSTD_compressBlock_doubleFast_noDict_generic()
258 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_doubleFast_dictMatchState_generic() argument
262 ZSTD_compressionParameters const* cParams = &ms->cParams; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
263 U32* const hashLong = ms->hashTable; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
265 U32* const hashSmall = ms->chainTable; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
267 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
273 const U32 prefixLowestIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
277 U32 offset_1=rep[0], offset_2=rep[1]; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
280 const ZSTD_matchState_t* const dms = ms->dictMatchState; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
296 assert(ms->window.dictLimit + (1U << cParams->windowLog) >= endIndex); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
307 while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */ in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
319 const U32 repIndex = curr + 1 - offset_1; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
326 if (((U32)((prefixLowestIndex-1) - repIndex) >= 3 /* intentional underflow */) in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
327 && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
329 mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
340 …while (((ip>anchor) & (matchLong>prefixLowest)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--;… in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
352 …while (((ip>anchor) & (dictMatchL>dictStart)) && (ip[-1] == dictMatchL[-1])) { ip--; dictMatchL--;… in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
371 ip += ((ip-anchor) >> kSearchStrength) + 1; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
379 { size_t const hl3 = ZSTD_hashPtr(ip+1, hBitsL, 8); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
380 size_t const dictHLNext = ZSTD_hashPtr(ip+1, dictHBitsL, 8); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
383 hashLong[hl3] = curr + 1; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
385 /* check prefix long +1 match */ in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
387 if (MEM_read64(matchL3) == MEM_read64(ip+1)) { in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
391 …while (((ip>anchor) & (matchL3>prefixLowest)) && (ip[-1] == matchL3[-1])) { ip--; matchL3--; mLeng… in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
395 /* check dict long +1 match */ in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
399 if (dictMatchL3 > dictStart && MEM_read64(dictMatchL3) == MEM_read64(ip+1)) { in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
400 … mLength = ZSTD_count_2segments(ip+1+8, dictMatchL3+8, iend, dictEnd, prefixLowest) + 8; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
402 offset = (U32)(curr + 1 - dictMatchIndexL3 - dictIndexDelta); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
403 …while (((ip>anchor) & (dictMatchL3>dictStart)) && (ip[-1] == dictMatchL3[-1])) { ip--; dictMatchL3… in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
407 /* if no long +1 match, explore the short match we found */ in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
411 …while (((ip>anchor) & (match>dictStart)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /… in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
415 …while (((ip>anchor) & (match>prefixLowest)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; … in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
436 hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
446 if ( ((U32)((prefixLowestIndex-1) - (U32)repIndex2) >= 3 /* intentional overflow */) in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
465 rep[1] = offset_2 ? offset_2 : offsetSaved; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
473 … ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], \
476 … return ZSTD_compressBlock_doubleFast_##dictMode##_generic(ms, seqStore, rep, src, srcSize, mls); \
491 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_doubleFast() argument
494 const U32 mls = ms->cParams.minMatch; in ZSTD_compressBlock_doubleFast()
499 return ZSTD_compressBlock_doubleFast_noDict_4(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast()
501 return ZSTD_compressBlock_doubleFast_noDict_5(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast()
503 return ZSTD_compressBlock_doubleFast_noDict_6(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast()
505 return ZSTD_compressBlock_doubleFast_noDict_7(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast()
511 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_doubleFast_dictMatchState() argument
514 const U32 mls = ms->cParams.minMatch; in ZSTD_compressBlock_doubleFast_dictMatchState()
519 return ZSTD_compressBlock_doubleFast_dictMatchState_4(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast_dictMatchState()
521 return ZSTD_compressBlock_doubleFast_dictMatchState_5(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast_dictMatchState()
523 return ZSTD_compressBlock_doubleFast_dictMatchState_6(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast_dictMatchState()
525 return ZSTD_compressBlock_doubleFast_dictMatchState_7(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast_dictMatchState()
531 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_doubleFast_extDict_generic() argument
535 ZSTD_compressionParameters const* cParams = &ms->cParams; in ZSTD_compressBlock_doubleFast_extDict_generic()
536 U32* const hashLong = ms->hashTable; in ZSTD_compressBlock_doubleFast_extDict_generic()
538 U32* const hashSmall = ms->chainTable; in ZSTD_compressBlock_doubleFast_extDict_generic()
545 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_doubleFast_extDict_generic()
547 const U32 lowLimit = ZSTD_getLowestMatchIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_doubleFast_extDict_generic()
549 const U32 dictLimit = ms->window.dictLimit; in ZSTD_compressBlock_doubleFast_extDict_generic()
552 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_compressBlock_doubleFast_extDict_generic()
555 U32 offset_1=rep[0], offset_2=rep[1]; in ZSTD_compressBlock_doubleFast_extDict_generic()
561 return ZSTD_compressBlock_doubleFast(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast_extDict_generic()
564 while (ip < ilimit) { /* < instead of <=, because (ip+1) */ in ZSTD_compressBlock_doubleFast_extDict_generic()
576 const U32 repIndex = curr + 1 - offset_1; /* offset_1 expected <= curr +1 */ in ZSTD_compressBlock_doubleFast_extDict_generic()
582 …if ((((U32)((prefixStartIndex-1) - repIndex) >= 3) /* intentional underflow : ensure repIndex does… in ZSTD_compressBlock_doubleFast_extDict_generic()
583 & (offset_1 <= curr+1 - dictStartIndex)) /* note: we are searching at curr+1 */ in ZSTD_compressBlock_doubleFast_extDict_generic()
584 && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { in ZSTD_compressBlock_doubleFast_extDict_generic()
586 mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixStart) + 4; in ZSTD_compressBlock_doubleFast_extDict_generic()
596 …while (((ip>anchor) & (matchLong>lowMatchPtr)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--; … in ZSTD_compressBlock_doubleFast_extDict_generic()
602 size_t const h3 = ZSTD_hashPtr(ip+1, hBitsL, 8); in ZSTD_compressBlock_doubleFast_extDict_generic()
607 hashLong[h3] = curr + 1; in ZSTD_compressBlock_doubleFast_extDict_generic()
608 if ( (matchIndex3 > dictStartIndex) && (MEM_read64(match3) == MEM_read64(ip+1)) ) { in ZSTD_compressBlock_doubleFast_extDict_generic()
613 offset = curr+1 - matchIndex3; in ZSTD_compressBlock_doubleFast_extDict_generic()
614 …while (((ip>anchor) & (match3>lowMatchPtr)) && (ip[-1] == match3[-1])) { ip--; match3--; mLength++… in ZSTD_compressBlock_doubleFast_extDict_generic()
620 …while (((ip>anchor) & (match>lowMatchPtr)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; }… in ZSTD_compressBlock_doubleFast_extDict_generic()
627 ip += ((ip-anchor) >> kSearchStrength) + 1; in ZSTD_compressBlock_doubleFast_extDict_generic()
642 hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); in ZSTD_compressBlock_doubleFast_extDict_generic()
650 …if ( (((U32)((prefixStartIndex-1) - repIndex2) >= 3) /* intentional overflow : ensure repIndex2 … in ZSTD_compressBlock_doubleFast_extDict_generic()
668 rep[1] = offset_2; in ZSTD_compressBlock_doubleFast_extDict_generic()
680 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_doubleFast_extDict() argument
683 U32 const mls = ms->cParams.minMatch; in ZSTD_compressBlock_doubleFast_extDict()
688 return ZSTD_compressBlock_doubleFast_extDict_4(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast_extDict()
690 return ZSTD_compressBlock_doubleFast_extDict_5(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast_extDict()
692 return ZSTD_compressBlock_doubleFast_extDict_6(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast_extDict()
694 return ZSTD_compressBlock_doubleFast_extDict_7(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast_extDict()