MCPcopy Create free account
hub / github.com/F-Stack/f-stack / check_match

Function check_match

freebsd/contrib/zlib/deflate.c:1451–1470  ·  view source on GitHub ↗

=========================================================================== * Check that the match at match_start is indeed a match. */

(s, start, match, length)

Source from the content-addressed store, hash-verified

1449 * Check that the match at match_start is indeed a match.
1450 */
1451local void check_match(s, start, match, length)
1452 deflate_state *s;
1453 IPos start, match;
1454 int length;
1455{
1456 /* check that the match is indeed a match */
1457 if (zmemcmp(s->window + match,
1458 s->window + start, length) != EQUAL) {
1459 fprintf(stderr, " start %u, match %u, length %d\n",
1460 start, match, length);
1461 do {
1462 fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
1463 } while (--length != 0);
1464 z_error("invalid match");
1465 }
1466 if (z_verbose > 1) {
1467 fprintf(stderr,"\\[%d,%d]", start-match, length);
1468 do { putc(s->window[start++], stderr); } while (--length != 0);
1469 }
1470}
1471#else
1472# define check_match(s, start, match, length)
1473#endif /* ZLIB_DEBUG */

Callers 3

deflate_fastFunction · 0.70
deflate_slowFunction · 0.70
deflate_rleFunction · 0.70

Calls 1

zmemcmpFunction · 0.85

Tested by

no test coverage detected