MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / check_match

Function check_match

zlib/deflate.c:1232–1251  ·  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

1230 * Check that the match at match_start is indeed a match.
1231 */
1232local void check_match(s, start, match, length)
1233 deflate_state *s;
1234 IPos start, match;
1235 int length;
1236{
1237 /* check that the match is indeed a match */
1238 if (zmemcmp(s->window + match,
1239 s->window + start, length) != EQUAL) {
1240 fprintf(stderr, " start %u, match %u, length %d\n",
1241 start, match, length);
1242 do {
1243 fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
1244 } while (--length != 0);
1245 z_error("invalid match");
1246 }
1247 if (z_verbose > 1) {
1248 fprintf(stderr,"\\[%d,%d]", start-match, length);
1249 do { putc(s->window[start++], stderr); } while (--length != 0);
1250 }
1251}
1252#else
1253# define check_match(s, start, match, length)
1254#endif /* DEBUG */

Callers 3

deflate_fastFunction · 0.85
deflate_slowFunction · 0.85
deflate_rleFunction · 0.85

Calls 2

zmemcmpFunction · 0.85
z_errorFunction · 0.85

Tested by

no test coverage detected