Lines Matching refs:match

292  * Provides the cost of the match part (offset + matchLength) of a sequence
316 /* match Length */
354 /* match Length */
431 const BYTE* match;
469 smallerPtr = nextPtr+1; /* new "smaller" => larger of match */
486 match = base + matchIndex;
487 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend);
489 match = dictBase + matchIndex;
490 matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart);
492 match = base + matchIndex; /* to prepare for next usage of match[matchLength] */
505 if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */
506 /* match is smaller than current */
510 smallerPtr = nextPtr+1; /* new "candidate" => larger than match, which was smaller than target */
513 /* match is larger than current */
588 U32 matchEndIdx = curr+8+1; /* farthest referenced position of any match => detects repetitive patterns */
655 /* HC3 match finder */
662 const BYTE* const match = base + matchIndex3;
663 mlen = ZSTD_count(ip, match, iLimit);
665 const BYTE* const match = dictBase + matchIndex3;
666 mlen = ZSTD_count_2segments(ip, match, iLimit, dictEnd, prefixStart);
671 DEBUGLOG(8, "found small match with hlog3, of length %u",
691 const BYTE* match;
697 match = base + matchIndex;
698 if (matchIndex >= dictLimit) assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expected */
699 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iLimit);
701 match = dictBase + matchIndex;
702 assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expected */
703 matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dictEnd, prefixStart);
705 match = base + matchIndex; /* prepare for match[matchLength] read */
709 DEBUGLOG(8, "found match of length %u at distance %u (offCode=%u)",
724 if (match[matchLength] < ip[matchLength]) {
725 /* match smaller than current */
729 smallerPtr = nextPtr+1; /* new candidate => larger than match, which was smaller than current */
750 const BYTE* match = dmsBase + dictMatchIndex;
751 matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dmsEnd, prefixStart);
753 match = base + dictMatchIndex + dmsIndexDelta; /* to prepare for next usage of match[matchLength] */
757 DEBUGLOG(8, "found dms match of length %u at distance %u (offCode=%u)",
771 if (match[matchLength] < ip[matchLength]) {
775 /* match is larger than current */
871 rawSeqStore_t seqStore; /* External match candidates store for this block */
872 U32 startPosInBlock; /* Start position of the current match candidate */
873 U32 endPosInBlock; /* End position of the current match candidate */
874 U32 offset; /* Offset of the match candidate */
900 * Calculates the beginning and end of the next match in the current block.
912 /* Setting match end position to MAX to ensure we never use an LDM during this block */
945 /* Match ends after the block ends, we can't use the whole match */
955 * Adds a match if it's long enough,
966 /* Ensure that current block position is not outside of the match */
975 DEBUGLOG(6, "ZSTD_optLdm_maybeAddMatch(): Adding ldm candidate match (offCode: %u matchLength %u) at block position=%u",
998 * at the end of a match from the ldm seq store, and will often be some bytes
1080 /* find first match */
1099 /* large match -> immediate encoding */
1109 DEBUGLOG(6, "large match (%u>%u), immediate encoding",
1184 /* last match must start at a minimum distance of 8 from oend */
1207 DEBUGLOG(7, "rPos:%u : no match found", cur);
1220 cur -= (opt[cur].mlen==0) ? opt[cur].litlen : 0; /* last sequence is actually only literals, fix cur to last match - note : may underflow, in which case, it's first sequence, and it's okay */
1222 if (cur > ZSTD_OPT_NUM) cur = 0; /* underflow => first match */
1233 DEBUGLOG(7, "testing match %u => offCode=%4u, mlen=%2u, llen=%2u",
1264 * of the last match, and the last sequence. This avoids us having to