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.
99 ush good_length; /* reduce lazy search above this match length */
100 ush max_lazy; /* do not perform lazy search above this match length */
101 ush nice_length; /* quit search above this match length */
338 * the longest match routines. Update the high water mark for the next
339 * time through here. WIN_INIT is set to MAX_MATCH since the longest match
675 * Initialize the "longest match" routines for a new zlib stream
1348 * Set match_start to the longest match starting at the given string and
1354 * OUT assertion: the match length is not greater than s->lookahead.
1360 register Bytef *match; /* matched string */
1361 register int len; /* length of current match */
1362 int best_len = (int)s->prev_length; /* best match length so far */
1363 int nice_match = s->nice_match; /* stop if match long enough */
1390 /* Do not waste too much time if we already have a good match: */
1404 match = s->window + cur_match;
1406 /* Skip to next match if the match length cannot increase
1407 * or if the match length is less than 2. Note that the checks below
1411 * However the length of the match is limited to the lookahead, so
1418 if (*(ushf*)(match + best_len - 1) != scan_end ||
1419 *(ushf*)match != scan_start) continue;
1421 /* It is not necessary to compare scan[2] and match[2] since they are
1422 * always equal when the other bytes match, given that the hash keys
1430 Assert(scan[2] == match[2], "scan[2]?");
1431 scan++, match++;
1433 } while (*(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
1434 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
1435 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
1436 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
1443 if (*scan == *match) scan++;
1450 if (match[best_len] != scan_end ||
1451 match[best_len - 1] != scan_end1 ||
1452 *match != *scan ||
1453 *++match != scan[1]) continue;
1457 * It is not necessary to compare scan[2] and match[2] since they
1458 * are always equal when the other bytes match, given that
1461 scan += 2, match++;
1462 Assert(*scan == *match, "match[2]?");
1468 } while (*++scan == *++match && *++scan == *++match &&
1469 *++scan == *++match && *++scan == *++match &&
1470 *++scan == *++match && *++scan == *++match &&
1471 *++scan == *++match && *++scan == *++match &&
1508 register Bytef *match; /* matched string */
1509 register int len; /* length of current match */
1522 match = s->window + cur_match;
1524 /* Return failure if the match length is less than 2:
1526 if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
1530 * It is not necessary to compare scan[2] and match[2] since they
1531 * are always equal when the other bytes match, given that
1534 scan += 2, match += 2;
1535 Assert(*scan == *match, "match[2]?");
1541 } while (*++scan == *++match && *++scan == *++match &&
1542 *++scan == *++match && *++scan == *++match &&
1543 *++scan == *++match && *++scan == *++match &&
1544 *++scan == *++match && *++scan == *++match &&
1565 * Check that the match at match_start is indeed a match.
1567 local void check_match(deflate_state *s, IPos start, IPos match, int length)
1569 /* check that the match is indeed a match */
1570 Bytef *back = s->window + (int)match, *here = s->window + start;
1572 if (match == (IPos)-1) {
1573 /* match starts one byte before the current window -- just compare the
1580 fprintf(stderr, " start %u, match %d, length %d\n",
1581 start, (int)match, length);
1585 z_error("invalid match");
1588 fprintf(stderr,"\\[%d,%d]", start - match, length);
1593 # define check_match(s, start, match, length)
1598 * IN assertion: strstart is set to the end of the current match.
1831 * for the next match, plus MIN_MATCH bytes to insert the
1832 * string following the next match.
1850 /* Find the longest match, discarding those <= prev_length.
1855 * of window index 0 (in particular we have to avoid a match
1869 /* Insert new strings in the hash table only if the match length
1899 /* No match, output a literal byte */
1920 * evaluation for matches: a match is finally adopted only if there is
1921 * no better match at the next window position.
1932 * for the next match, plus MIN_MATCH bytes to insert the
1933 * string following the next match.
1951 /* Find the longest match, discarding those <= prev_length.
1959 * of window index 0 (in particular we have to avoid a match
1973 * but we will ignore the current match anyway.
1978 /* If there was a match at the previous step and the current
1979 * match is not better, output the previous match:
1990 /* Insert in hash table all strings up to the end of the match.
2009 /* If there was no match at the previous position, output a
2010 * single literal. If there was a match but the current match
2011 * is longer, truncate the previous match to a single literal.
2022 /* There is no previous match to compare with, wait for
2055 uInt prev; /* byte at distance one to match */
2092 /* Emit match if have run of MIN_MATCH or longer, else emit literal */
2102 /* No match, output a literal byte */