• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/contrib/zstd/lib/compress/

Lines Matching defs:match

100  *    or init from zero, using src for literals stats, or flat 1 for match symbols
253 * Provides the cost of the match part (offset + matchLength) of a sequence
275 /* match Length */
306 /* match offset code (0-2=>repCode; 3+=>offset+2) */
313 /* match Length */
388 const BYTE* match;
422 smallerPtr = nextPtr+1; /* new "smaller" => larger of match */
439 match = base + matchIndex;
440 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend);
442 match = dictBase + matchIndex;
443 matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart);
445 match = base + matchIndex; /* to prepare for next usage of match[matchLength] */
458 if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */
459 /* match is smaller than current */
463 smallerPtr = nextPtr+1; /* new "candidate" => larger than match, which was smaller than target */
466 /* match is larger than current */
541 U32 matchEndIdx = curr+8+1; /* farthest referenced position of any match => detects repetitive patterns */
608 /* HC3 match finder */
615 const BYTE* const match = base + matchIndex3;
616 mlen = ZSTD_count(ip, match, iLimit);
618 const BYTE* const match = dictBase + matchIndex3;
619 mlen = ZSTD_count_2segments(ip, match, iLimit, dictEnd, prefixStart);
624 DEBUGLOG(8, "found small match with hlog3, of length %u",
644 const BYTE* match;
650 match = base + matchIndex;
651 if (matchIndex >= dictLimit) assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expected */
652 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iLimit);
654 match = dictBase + matchIndex;
655 assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expected */
656 matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dictEnd, prefixStart);
658 match = base + matchIndex; /* prepare for match[matchLength] read */
662 DEBUGLOG(8, "found match of length %u at distance %u (offCode=%u)",
678 if (match[matchLength] < ip[matchLength]) {
679 /* match smaller than current */
683 smallerPtr = nextPtr+1; /* new candidate => larger than match, which was smaller than current */
703 const BYTE* match = dmsBase + dictMatchIndex;
704 matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dmsEnd, prefixStart);
706 match = base + dictMatchIndex + dmsIndexDelta; /* to prepare for next usage of match[matchLength] */
710 DEBUGLOG(8, "found dms match of length %u at distance %u (offCode=%u)",
725 if (match[matchLength] < ip[matchLength]) {
729 /* match is larger than current */
743 ZSTD_match_t* matches, /* store result (match found, increasing size) in this table */
773 rawSeqStore_t seqStore; /* External match candidates store for this block */
774 U32 startPosInBlock; /* Start position of the current match candidate */
775 U32 endPosInBlock; /* End position of the current match candidate */
776 U32 offset; /* Offset of the match candidate */
800 * Calculates the beginning and end of the next match in the current block.
810 /* Setting match end position to MAX to ensure we never use an LDM during this block */
843 /* Match ends after the block ends, we can't use the whole match */
853 * Adds a match if it's long enough, based on it's 'matchStartPosInBlock'
863 /* Ensure that current block position is not outside of the match */
871 DEBUGLOG(6, "ZSTD_optLdm_maybeAddMatch(): Adding ldm candidate match (offCode: %u matchLength %u) at block position=%u",
891 * at the end of a match from the ldm seq store, and will often be some bytes
971 /* find first match */
990 /* large match -> immediate encoding */
1000 DEBUGLOG(6, "large match (%u>%u), immediate encoding",
1074 /* last match must start at a minimum distance of 8 from oend */
1096 DEBUGLOG(7, "rPos:%u : no match found", cur);
1109 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 */
1111 if (cur > ZSTD_OPT_NUM) cur = 0; /* underflow => first match */
1122 DEBUGLOG(7, "testing match %u => offCode=%4u, mlen=%2u, llen=%2u",
1153 * of the last match, and the last sequence. This avoids us having to