Lines Matching defs:matchIndex
231 static int LZ4HC_protectDictEnd(U32 const dictLimit, U32 const matchIndex)
233 return ((U32)((dictLimit - 1) - matchIndex) >= 3);
267 U32 matchIndex;
274 matchIndex = HashTable[LZ4HC_hashPtr(ip)];
276 matchIndex, lowestMatchIndex);
278 while ((matchIndex>=lowestMatchIndex) && (nbAttempts>0)) {
281 assert(matchIndex < ipIndex);
282 if (favorDecSpeed && (ipIndex - matchIndex < 8)) {
284 } else if (matchIndex >= prefixIdx) { /* within current Prefix */
285 const BYTE* const matchPtr = prefixPtr + matchIndex - prefixIdx;
298 } else { /* lowestMatchIndex <= matchIndex < dictLimit */
299 const BYTE* const matchPtr = dictStart + (matchIndex - dictIdx);
300 assert(matchIndex >= dictIdx);
301 if ( likely(matchIndex <= prefixIdx - 4)
304 const BYTE* vLimit = ip + (prefixIdx - matchIndex);
313 *matchpos = prefixPtr - prefixIdx + matchIndex + back; /* virtual pos, relative to ip, to retrieve offset */
319 if (matchIndex + (U32)longest <= ipIndex) {
327 U32 const candidateDist = DELTANEXTU16(chainTable, matchIndex + (U32)pos);
335 if (distanceToNextMatch > matchIndex) break; /* avoid overflow */
336 matchIndex -= distanceToNextMatch;
340 { U32 const distNextMatch = DELTANEXTU16(chainTable, matchIndex);
342 U32 const matchCandidateIdx = matchIndex-1;
381 matchIndex = newMatchIndex;
385 matchIndex = prefixIdx;
391 matchIndex = prefixIdx;
393 matchIndex = newMatchIndex;
397 assert(prefixPtr - prefixIdx + matchIndex != ip);
398 if ((size_t)(ip - prefixPtr) + prefixIdx - matchIndex > LZ4_DISTANCE_MAX) break;
401 *matchpos = prefixPtr - prefixIdx + matchIndex; /* virtual pos, relative to ip, to retrieve offset */
404 { U32 const distToNextPattern = DELTANEXTU16(chainTable, matchIndex);
405 if (distToNextPattern > matchIndex) break; /* avoid overflow */
406 matchIndex -= distToNextPattern;
413 matchIndex -= DELTANEXTU16(chainTable, matchIndex + matchChainPos);
415 } /* while ((matchIndex>=lowestMatchIndex) && (nbAttempts)) */
423 matchIndex = dictMatchIndex + lowestMatchIndex - (U32)dictEndOffset;
424 while (ipIndex - matchIndex <= LZ4_DISTANCE_MAX && nbAttempts--) {
437 *matchpos = prefixPtr - prefixIdx + matchIndex + back;
443 matchIndex -= nextOffset;