Lines Matching defs:match

18  *      string matches are performed only when the previous match ends. So it
22 * is used to find longer strings when a small match has been found.
117 ush good_length; /* reduce lazy search above this match length */
118 ush max_lazy; /* do not perform lazy search above this match length */
119 ush nice_length; /* quit search above this match length */
347 * the longest match routines. Update the high water mark for the next
348 * time through here. WIN_INIT is set to MAX_MATCH since the longest match
709 * Initialize the "longest match" routines for a new zlib stream
1387 * Set match_start to the longest match starting at the given string and
1393 * OUT assertion: the match length is not greater than s->lookahead.
1398 register Bytef *match; /* matched string */
1399 register int len; /* length of current match */
1400 int best_len = (int)s->prev_length; /* best match length so far */
1401 int nice_match = s->nice_match; /* stop if match long enough */
1428 /* Do not waste too much time if we already have a good match: */
1442 match = s->window + cur_match;
1444 /* Skip to next match if the match length cannot increase
1445 * or if the match length is less than 2. Note that the checks below
1449 * However the length of the match is limited to the lookahead, so
1456 if (*(ushf*)(match + best_len - 1) != scan_end ||
1457 *(ushf*)match != scan_start) continue;
1459 /* It is not necessary to compare scan[2] and match[2] since they are
1460 * always equal when the other bytes match, given that the hash keys
1469 Assert(scan[2] == match[2], "scan[2]?");
1471 /* When using CRC hashing, scan[2] and match[2] may mismatch, but in
1476 Assert(scan[2] == match[2] || scan[3] != match[3], "scan[2]??");
1478 scan++, match++;
1480 } while (*(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
1481 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
1482 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
1483 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
1490 if (*scan == *match) scan++;
1497 if (match[best_len] != scan_end ||
1498 match[best_len - 1] != scan_end1 ||
1499 *match != *scan ||
1500 *++match != scan[1]) continue;
1504 * It is not necessary to compare scan[2] and match[2] since they
1505 * are always equal when the other bytes match, given that
1508 scan += 2, match++;
1510 Assert(*scan == *match, "match[2]?");
1512 /* When using CRC hashing, scan[2] and match[2] may mismatch, but in
1517 Assert(*scan == *match || scan[1] != match[1], "match[2]??");
1524 } while (*++scan == *++match && *++scan == *++match &&
1525 *++scan == *++match && *++scan == *++match &&
1526 *++scan == *++match && *++scan == *++match &&
1527 *++scan == *++match && *++scan == *++match &&
1563 register Bytef *match; /* matched string */
1564 register int len; /* length of current match */
1577 match = s->window + cur_match;
1579 /* Return failure if the match length is less than 2:
1581 if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
1585 * It is not necessary to compare scan[2] and match[2] since they
1586 * are always equal when the other bytes match, given that
1589 scan += 2, match += 2;
1590 Assert(*scan == *match, "match[2]?");
1596 } while (*++scan == *++match && *++scan == *++match &&
1597 *++scan == *++match && *++scan == *++match &&
1598 *++scan == *++match && *++scan == *++match &&
1599 *++scan == *++match && *++scan == *++match &&
1620 * Check that the match at match_start is indeed a match.
1622 local void check_match(deflate_state *s, IPos start, IPos match, int length) {
1623 /* check that the match is indeed a match */
1624 if (zmemcmp(s->window + match,
1626 fprintf(stderr, " start %u, match %u, length %d\n",
1627 start, match, length);
1629 fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
1631 z_error("invalid match");
1634 fprintf(stderr,"\\[%d,%d]", start - match, length);
1639 # define check_match(s, start, match, length)
1644 * IN assertion: strstart is set to the end of the current match.
1875 * for the next match, plus MIN_MATCH bytes to insert the
1876 * string following the next match.
1894 /* Find the longest match, discarding those <= prev_length.
1899 * of window index 0 (in particular we have to avoid a match
1913 /* Insert new strings in the hash table only if the match length
1946 /* No match, output a literal byte */
1967 * evaluation for matches: a match is finally adopted only if there is
1968 * no better match at the next window position.
1978 * for the next match, plus MIN_MATCH bytes to insert the
1979 * string following the next match.
1997 /* Find the longest match, discarding those <= prev_length.
2005 * of window index 0 (in particular we have to avoid a match
2019 * but we will ignore the current match anyway.
2024 /* If there was a match at the previous step and the current
2025 * match is not better, output the previous match:
2032 /* The window has slid one byte past the previous match,
2042 /* Insert in hash table all strings up to the end of the match.
2061 /* If there was no match at the previous position, output a
2062 * single literal. If there was a match but the current match
2063 * is longer, truncate the previous match to a single literal.
2074 /* There is no previous match to compare with, wait for
2106 uInt prev; /* byte at distance one to match */
2143 /* Emit match if have run of MIN_MATCH or longer, else emit literal */
2153 /* No match, output a literal byte */