Lines Matching +full:1 +full:ms
15 void ZSTD_fillHashTable(ZSTD_matchState_t* ms, in ZSTD_fillHashTable() argument
19 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_fillHashTable()
20 U32* const hashTable = ms->hashTable; in ZSTD_fillHashTable()
23 const BYTE* const base = ms->window.base; in ZSTD_fillHashTable()
24 const BYTE* ip = base + ms->nextToUpdate; in ZSTD_fillHashTable()
38 for (p = 1; p < fastHashFillStep; ++p) { in ZSTD_fillHashTable()
50 * 1. Hash (map position to hash value via input read)
59 * Rather than do 1->2->3->4 sequentially for a single position before moving
71 * N+1 | ... TM
88 * N+1 | H
94 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_noDict_generic() argument
98 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_fast_noDict_generic()
99 U32* const hashTable = ms->hashTable; in ZSTD_compressBlock_fast_noDict_generic()
102 size_t const stepSize = hasStep ? (cParams->targetLength + !(cParams->targetLength) + 1) : 2; in ZSTD_compressBlock_fast_noDict_generic()
103 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_fast_noDict_generic()
106 const U32 prefixStartIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_fast_noDict_generic()
119 U32 rep_offset2 = rep[1]; in ZSTD_compressBlock_fast_noDict_generic()
137 const size_t kStepIncr = (1 << (kSearchStrength - 1)); in ZSTD_compressBlock_fast_noDict_generic()
142 U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, curr, cParams->windowLog); in ZSTD_compressBlock_fast_noDict_generic()
155 ip1 = ip0 + 1; in ZSTD_compressBlock_fast_noDict_generic()
157 ip3 = ip2 + 1; in ZSTD_compressBlock_fast_noDict_generic()
180 mLength = ip0[-1] == match0[-1]; in ZSTD_compressBlock_fast_noDict_generic()
192 mval = MEM_read32(ip0) ^ 1; /* guaranteed to not match. */ in ZSTD_compressBlock_fast_noDict_generic()
201 /* lookup ip[1] */ in ZSTD_compressBlock_fast_noDict_generic()
221 mval = MEM_read32(ip0) ^ 1; /* guaranteed to not match. */ in ZSTD_compressBlock_fast_noDict_generic()
230 /* lookup ip[1] */ in ZSTD_compressBlock_fast_noDict_generic()
259 rep[1] = rep_offset2 ? rep_offset2 : offsetSaved; in ZSTD_compressBlock_fast_noDict_generic()
274 while (((ip0>anchor) & (match0>prefixStart)) && (ip0[-1] == match0[-1])) { in ZSTD_compressBlock_fast_noDict_generic()
319 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], \
322 … return ZSTD_compressBlock_fast_##dictMode##_generic(ms, seqStore, rep, src, srcSize, mls, step); \
325 ZSTD_GEN_FAST_FN(noDict, 4, 1)
326 ZSTD_GEN_FAST_FN(noDict, 5, 1)
327 ZSTD_GEN_FAST_FN(noDict, 6, 1)
328 ZSTD_GEN_FAST_FN(noDict, 7, 1)
336 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast() argument
339 U32 const mls = ms->cParams.minMatch; in ZSTD_compressBlock_fast()
340 assert(ms->dictMatchState == NULL); in ZSTD_compressBlock_fast()
341 if (ms->cParams.targetLength > 1) { in ZSTD_compressBlock_fast()
346 return ZSTD_compressBlock_fast_noDict_4_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
348 return ZSTD_compressBlock_fast_noDict_5_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
350 return ZSTD_compressBlock_fast_noDict_6_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
352 return ZSTD_compressBlock_fast_noDict_7_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
359 return ZSTD_compressBlock_fast_noDict_4_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
361 return ZSTD_compressBlock_fast_noDict_5_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
363 return ZSTD_compressBlock_fast_noDict_6_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
365 return ZSTD_compressBlock_fast_noDict_7_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
373 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_dictMatchState_generic() argument
376 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_fast_dictMatchState_generic()
377 U32* const hashTable = ms->hashTable; in ZSTD_compressBlock_fast_dictMatchState_generic()
381 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_fast_dictMatchState_generic()
385 const U32 prefixStartIndex = ms->window.dictLimit; in ZSTD_compressBlock_fast_dictMatchState_generic()
389 U32 offset_1=rep[0], offset_2=rep[1]; in ZSTD_compressBlock_fast_dictMatchState_generic()
392 const ZSTD_matchState_t* const dms = ms->dictMatchState; in ZSTD_compressBlock_fast_dictMatchState_generic()
405 const U32 maxDistance = 1U << cParams->windowLog; in ZSTD_compressBlock_fast_dictMatchState_generic()
425 while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */ in ZSTD_compressBlock_fast_dictMatchState_generic()
431 const U32 repIndex = curr + 1 - offset_1; in ZSTD_compressBlock_fast_dictMatchState_generic()
437 …if ( ((U32)((prefixStartIndex-1) - repIndex) >= 3) /* intentional underflow : ensure repIndex isn'… in ZSTD_compressBlock_fast_dictMatchState_generic()
438 && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { in ZSTD_compressBlock_fast_dictMatchState_generic()
440 mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixStart) + 4; in ZSTD_compressBlock_fast_dictMatchState_generic()
449 assert(stepSize >= 1); in ZSTD_compressBlock_fast_dictMatchState_generic()
457 && (ip[-1] == dictMatch[-1])) { in ZSTD_compressBlock_fast_dictMatchState_generic()
466 assert(stepSize >= 1); in ZSTD_compressBlock_fast_dictMatchState_generic()
474 && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */ in ZSTD_compressBlock_fast_dictMatchState_generic()
497 if ( ((U32)((prefixStartIndex-1) - (U32)repIndex2) >= 3 /* intentional overflow */) in ZSTD_compressBlock_fast_dictMatchState_generic()
515 rep[1] = offset_2 ? offset_2 : offsetSaved; in ZSTD_compressBlock_fast_dictMatchState_generic()
528 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_dictMatchState() argument
531 U32 const mls = ms->cParams.minMatch; in ZSTD_compressBlock_fast_dictMatchState()
532 assert(ms->dictMatchState != NULL); in ZSTD_compressBlock_fast_dictMatchState()
537 return ZSTD_compressBlock_fast_dictMatchState_4_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_dictMatchState()
539 return ZSTD_compressBlock_fast_dictMatchState_5_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_dictMatchState()
541 return ZSTD_compressBlock_fast_dictMatchState_6_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_dictMatchState()
543 return ZSTD_compressBlock_fast_dictMatchState_7_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_dictMatchState()
549 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_extDict_generic() argument
552 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_fast_extDict_generic()
553 U32* const hashTable = ms->hashTable; in ZSTD_compressBlock_fast_extDict_generic()
557 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_fast_extDict_generic()
558 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_compressBlock_fast_extDict_generic()
563 const U32 lowLimit = ZSTD_getLowestMatchIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_fast_extDict_generic()
566 const U32 dictLimit = ms->window.dictLimit; in ZSTD_compressBlock_fast_extDict_generic()
572 U32 offset_1=rep[0], offset_2=rep[1]; in ZSTD_compressBlock_fast_extDict_generic()
580 return ZSTD_compressBlock_fast(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_extDict_generic()
583 while (ip < ilimit) { /* < instead of <=, because (ip+1) */ in ZSTD_compressBlock_fast_extDict_generic()
589 const U32 repIndex = curr + 1 - offset_1; in ZSTD_compressBlock_fast_extDict_generic()
595 if ( ( ((U32)((prefixStartIndex-1) - repIndex) >= 3) /* intentional underflow */ in ZSTD_compressBlock_fast_extDict_generic()
596 & (offset_1 <= curr+1 - dictStartIndex) ) /* note: we are searching at curr+1 */ in ZSTD_compressBlock_fast_extDict_generic()
597 && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { in ZSTD_compressBlock_fast_extDict_generic()
599 …size_t const rLength = ZSTD_count_2segments(ip+1 +4, repMatch +4, iend, repMatchEnd, prefixStart) … in ZSTD_compressBlock_fast_extDict_generic()
607 assert(stepSize >= 1); in ZSTD_compressBlock_fast_extDict_generic()
615 …while (((ip>anchor) & (match>lowMatchPtr)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; }… in ZSTD_compressBlock_fast_extDict_generic()
631 …if ( (((U32)((prefixStartIndex-1) - repIndex2) >= 3) & (offset_2 <= curr - dictStartIndex)) /* in… in ZSTD_compressBlock_fast_extDict_generic()
647 rep[1] = offset_2; in ZSTD_compressBlock_fast_extDict_generic()
659 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_extDict() argument
662 U32 const mls = ms->cParams.minMatch; in ZSTD_compressBlock_fast_extDict()
667 return ZSTD_compressBlock_fast_extDict_4_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_extDict()
669 return ZSTD_compressBlock_fast_extDict_5_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_extDict()
671 return ZSTD_compressBlock_fast_extDict_6_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_extDict()
673 return ZSTD_compressBlock_fast_extDict_7_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_extDict()