MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / check_match

Function check_match

extlibs/minizip/src/deflate.c:1563–1582  ·  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

1561 * Check that the match at match_start is indeed a match.
1562 */
1563local void check_match(s, start, match, length)
1564 deflate_state *s;
1565 IPos start, match;
1566 int length;
1567{
1568/* check that the match is indeed a match */
1569 if (zmemcmp(s->window + match,
1570 s->window + start, length) != EQUAL) {
1571 fprintf(stderr, " start %u, match %u, length %d\n",
1572 start, match, length);
1573 do {
1574 fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
1575 } while (--length != 0);
1576 z_error("invalid match");
1577 }
1578 if (z_verbose > 1) {
1579 fprintf(stderr,"\\[%d,%d]", start-match, length);
1580 do { putc(s->window[start++], stderr); } while (--length != 0);
1581 }
1582}
1583#else
1584# define check_match(s, start, match, length)
1585#endif /* ZLIB_DEBUG */

Callers 3

deflate_fastFunction · 0.70
deflate_slowFunction · 0.70
deflate_rleFunction · 0.70

Calls 2

zmemcmpFunction · 0.85
fprintfFunction · 0.85

Tested by

no test coverage detected