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()
48 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_generic() argument
52 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_fast_generic()
53 U32* const hashTable = ms->hashTable; in ZSTD_compressBlock_fast_generic()
56 size_t const stepSize = cParams->targetLength + !(cParams->targetLength) + 1; in ZSTD_compressBlock_fast_generic()
57 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_fast_generic()
59 /* We check ip0 (ip + 0) and ip1 (ip + 1) each loop */ in ZSTD_compressBlock_fast_generic()
64 const U32 prefixStartIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_fast_generic()
68 U32 offset_1=rep[0], offset_2=rep[1]; in ZSTD_compressBlock_fast_generic()
74 ip1 = ip0 + 1; in ZSTD_compressBlock_fast_generic()
76 U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, curr, cParams->windowLog); in ZSTD_compressBlock_fast_generic()
113 assert(ip0 + 1 == ip1); in ZSTD_compressBlock_fast_generic()
116 mLength = (ip2[-1] == repMatch[-1]) ? 1 : 0; in ZSTD_compressBlock_fast_generic()
133 { size_t const step = ((size_t)(ip0-anchor) >> (kSearchStrength - 1)) + stepSize; in ZSTD_compressBlock_fast_generic()
147 && (ip0[-1] == match0[-1])) { ip0--; match0--; mLength++; } /* catch up */ in ZSTD_compressBlock_fast_generic()
174 ip1 = ip0 + 1; in ZSTD_compressBlock_fast_generic()
179 rep[1] = offset_2 ? offset_2 : offsetSaved; in ZSTD_compressBlock_fast_generic()
187 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast() argument
190 U32 const mls = ms->cParams.minMatch; in ZSTD_compressBlock_fast()
191 assert(ms->dictMatchState == NULL); in ZSTD_compressBlock_fast()
196 return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 4); in ZSTD_compressBlock_fast()
198 return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 5); in ZSTD_compressBlock_fast()
200 return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 6); in ZSTD_compressBlock_fast()
202 return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 7); in ZSTD_compressBlock_fast()
208 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_dictMatchState_generic() argument
211 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_fast_dictMatchState_generic()
212 U32* const hashTable = ms->hashTable; in ZSTD_compressBlock_fast_dictMatchState_generic()
216 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_fast_dictMatchState_generic()
220 const U32 prefixStartIndex = ms->window.dictLimit; in ZSTD_compressBlock_fast_dictMatchState_generic()
224 U32 offset_1=rep[0], offset_2=rep[1]; in ZSTD_compressBlock_fast_dictMatchState_generic()
227 const ZSTD_matchState_t* const dms = ms->dictMatchState; in ZSTD_compressBlock_fast_dictMatchState_generic()
240 const U32 maxDistance = 1U << cParams->windowLog; in ZSTD_compressBlock_fast_dictMatchState_generic()
258 while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */ in ZSTD_compressBlock_fast_dictMatchState_generic()
264 const U32 repIndex = curr + 1 - offset_1; in ZSTD_compressBlock_fast_dictMatchState_generic()
270 …if ( ((U32)((prefixStartIndex-1) - repIndex) >= 3) /* intentional underflow : ensure repIndex isn'… in ZSTD_compressBlock_fast_dictMatchState_generic()
271 && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { in ZSTD_compressBlock_fast_dictMatchState_generic()
273 mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixStart) + 4; in ZSTD_compressBlock_fast_dictMatchState_generic()
282 assert(stepSize >= 1); in ZSTD_compressBlock_fast_dictMatchState_generic()
290 && (ip[-1] == dictMatch[-1])) { in ZSTD_compressBlock_fast_dictMatchState_generic()
299 assert(stepSize >= 1); in ZSTD_compressBlock_fast_dictMatchState_generic()
307 && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */ in ZSTD_compressBlock_fast_dictMatchState_generic()
330 if ( ((U32)((prefixStartIndex-1) - (U32)repIndex2) >= 3 /* intentional overflow */) in ZSTD_compressBlock_fast_dictMatchState_generic()
348 rep[1] = offset_2 ? offset_2 : offsetSaved; in ZSTD_compressBlock_fast_dictMatchState_generic()
355 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_dictMatchState() argument
358 U32 const mls = ms->cParams.minMatch; in ZSTD_compressBlock_fast_dictMatchState()
359 assert(ms->dictMatchState != NULL); in ZSTD_compressBlock_fast_dictMatchState()
364 return ZSTD_compressBlock_fast_dictMatchState_generic(ms, seqStore, rep, src, srcSize, 4); in ZSTD_compressBlock_fast_dictMatchState()
366 return ZSTD_compressBlock_fast_dictMatchState_generic(ms, seqStore, rep, src, srcSize, 5); in ZSTD_compressBlock_fast_dictMatchState()
368 return ZSTD_compressBlock_fast_dictMatchState_generic(ms, seqStore, rep, src, srcSize, 6); in ZSTD_compressBlock_fast_dictMatchState()
370 return ZSTD_compressBlock_fast_dictMatchState_generic(ms, seqStore, rep, src, srcSize, 7); in ZSTD_compressBlock_fast_dictMatchState()
376 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_extDict_generic() argument
379 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_fast_extDict_generic()
380 U32* const hashTable = ms->hashTable; in ZSTD_compressBlock_fast_extDict_generic()
384 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_fast_extDict_generic()
385 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_compressBlock_fast_extDict_generic()
390 const U32 lowLimit = ZSTD_getLowestMatchIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_fast_extDict_generic()
393 const U32 dictLimit = ms->window.dictLimit; in ZSTD_compressBlock_fast_extDict_generic()
399 U32 offset_1=rep[0], offset_2=rep[1]; in ZSTD_compressBlock_fast_extDict_generic()
405 return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, mls); in ZSTD_compressBlock_fast_extDict_generic()
408 while (ip < ilimit) { /* < instead of <=, because (ip+1) */ in ZSTD_compressBlock_fast_extDict_generic()
414 const U32 repIndex = curr + 1 - offset_1; in ZSTD_compressBlock_fast_extDict_generic()
419 assert(offset_1 <= curr +1); /* check repIndex */ in ZSTD_compressBlock_fast_extDict_generic()
421 …if ( (((U32)((prefixStartIndex-1) - repIndex) >= 3) /* intentional underflow */ & (repIndex > dict… in ZSTD_compressBlock_fast_extDict_generic()
422 && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { in ZSTD_compressBlock_fast_extDict_generic()
424 …size_t const rLength = ZSTD_count_2segments(ip+1 +4, repMatch +4, iend, repMatchEnd, prefixStart) … in ZSTD_compressBlock_fast_extDict_generic()
432 assert(stepSize >= 1); in ZSTD_compressBlock_fast_extDict_generic()
440 …while (((ip>anchor) & (match>lowMatchPtr)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; }… in ZSTD_compressBlock_fast_extDict_generic()
456 …if ( (((U32)((prefixStartIndex-1) - repIndex2) >= 3) & (repIndex2 > dictStartIndex)) /* intention… in ZSTD_compressBlock_fast_extDict_generic()
472 rep[1] = offset_2; in ZSTD_compressBlock_fast_extDict_generic()
480 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_extDict() argument
483 U32 const mls = ms->cParams.minMatch; in ZSTD_compressBlock_fast_extDict()
488 return ZSTD_compressBlock_fast_extDict_generic(ms, seqStore, rep, src, srcSize, 4); in ZSTD_compressBlock_fast_extDict()
490 return ZSTD_compressBlock_fast_extDict_generic(ms, seqStore, rep, src, srcSize, 5); in ZSTD_compressBlock_fast_extDict()
492 return ZSTD_compressBlock_fast_extDict_generic(ms, seqStore, rep, src, srcSize, 6); in ZSTD_compressBlock_fast_extDict()
494 return ZSTD_compressBlock_fast_extDict_generic(ms, seqStore, rep, src, srcSize, 7); in ZSTD_compressBlock_fast_extDict()