Lines Matching full:check
35 * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths
52 * - Simplified bad distance check in inflate_fast()
79 * - Check next_in and next_out for Z_NULL on entry to inflate()
450 /* check function to use adler32() for zlib or crc32() for gzip */
452 # define UPDATE_CHECK(check, buf, len) \ argument
453 (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
455 # define UPDATE_CHECK(check, buf, len) adler32(check, buf, len) argument
458 /* check macros for header crc */
460 # define CRC2(check, word) \ argument
464 check = crc32(check, hbuf, 2); \
467 # define CRC4(check, word) \ argument
473 check = crc32(check, hbuf, 4); \
605 update the check value, and determine whether any progress has been made
652 if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */
669 state->check = crc32(0L, Z_NULL, 0);
670 CRC2(state->check, hold);
677 if (!(state->wrap & 1) || /* check if zlib header allowed */
682 strm->msg = (char *)"incorrect header check";
703 strm->adler = state->check = adler32(0L, Z_NULL, 0);
724 CRC2(state->check, hold);
733 CRC4(state->check, hold);
744 CRC2(state->check, hold);
755 CRC2(state->check, hold);
775 state->check = crc32(state->check, next, copy);
797 state->check = crc32(state->check, next, copy);
819 state->check = crc32(state->check, next, copy);
831 if ((state->wrap & 4) && hold != (state->check & 0xffff)) {
842 strm->adler = state->check = crc32(0L, Z_NULL, 0);
848 strm->adler = state->check = ZSWAP32(hold);
857 strm->adler = state->check = adler32(0L, Z_NULL, 0);
866 state->mode = CHECK;
1026 /* check for end-of-block code (better have one) */
1219 case CHECK:
1226 strm->adler = state->check =
1227 UPDATE_CHECK(state->check, put - out, out);
1233 ZSWAP32(hold)) != state->check) {
1234 strm->msg = (char *)"incorrect data check";
1239 Tracev((stderr, "inflate: check matches trailer\n"));
1248 strm->msg = (char *)"incorrect length check";
1273 Return from inflate(), updating the total counts and the check value.
1281 (state->mode < CHECK || flush != Z_FINISH)))
1292 strm->adler = state->check =
1293 UPDATE_CHECK(state->check, strm->next_out - out, out);
1323 /* check state */
1348 /* check state */
1354 /* check for correct dictionary identifier */
1358 if (dictid != state->check)
1380 /* check state */
1434 /* check parameters */
1465 state->wrap &= ~4; /* no point in computing a check value now */
1478 implementation to provide an additional safety check. PPP uses
1502 /* check input */
1558 int ZEXPORT inflateValidate(strm, check) in inflateValidate() argument
1560 int check;
1566 if (check && state->wrap)