Go to the documentation of this file.
100 void makefixed
OF((
void));
110 strm->zalloc == (alloc_func)0 ||
strm->zfree == (free_func)0)
133 state->dmax = 32768U;
169 if (windowBits < 0) {
171 windowBits = -windowBits;
174 wrap = (windowBits >> 4) + 5;
182 if (windowBits && (windowBits < 8 || windowBits > 15))
191 state->wbits = (unsigned)windowBits;
205 stream_size != (
int)(
sizeof(
z_stream)))
209 if (
strm->zalloc == (alloc_func)0) {
217 if (
strm->zfree == (free_func)0)
282 static int virgin = 1;
293 while (sym < 144)
state->lens[sym++] = 8;
294 while (sym < 256)
state->lens[sym++] = 9;
295 while (sym < 280)
state->lens[sym++] = 7;
296 while (sym < 288)
state->lens[sym++] = 8;
304 while (sym < 32)
state->lens[sym++] = 5;
348 puts(
" /* inffixed.h -- table for decoding fixed codes");
349 puts(
" * Generated automatically by makefixed().");
352 puts(
" /* WARNING: this file should *not* be used by applications.");
353 puts(
" It is part of the implementation of this library and is");
354 puts(
" subject to change. Applications should only use zlib.h.");
358 printf(
" static const code lenfix[%u] = {",
size);
361 if ((low % 7) == 0)
printf(
"\n ");
362 printf(
"{%u,%u,%d}", (low & 127) == 99 ? 64 :
state.lencode[low].op,
363 state.lencode[low].bits,
state.lencode[low].val);
364 if (++low ==
size)
break;
369 printf(
"\n static const code distfix[%u] = {",
size);
372 if ((low % 6) == 0)
printf(
"\n ");
374 state.distcode[low].val);
375 if (++low ==
size)
break;
408 state->window = (
unsigned char FAR *)
410 sizeof(
unsigned char));
415 if (
state->wsize == 0) {
438 state->wnext += dist;
450 # define UPDATE(check, buf, len) \
451 (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
453 # define UPDATE(check, buf, len) adler32(check, buf, len)
458 # define CRC2(check, word) \
460 hbuf[0] = (unsigned char)(word); \
461 hbuf[1] = (unsigned char)((word) >> 8); \
462 check = crc32(check, hbuf, 2); \
465 # define CRC4(check, word) \
467 hbuf[0] = (unsigned char)(word); \
468 hbuf[1] = (unsigned char)((word) >> 8); \
469 hbuf[2] = (unsigned char)((word) >> 16); \
470 hbuf[3] = (unsigned char)((word) >> 24); \
471 check = crc32(check, hbuf, 4); \
478 put = strm->next_out; \
479 left = strm->avail_out; \
480 next = strm->next_in; \
481 have = strm->avail_in; \
482 hold = state->hold; \
483 bits = state->bits; \
489 strm->next_out = put; \
490 strm->avail_out = left; \
491 strm->next_in = next; \
492 strm->avail_in = have; \
493 state->hold = hold; \
494 state->bits = bits; \
508 if (have == 0) goto inf_leave; \
510 hold += (unsigned long)(*next++) << bits; \
516 #define NEEDBITS(n) \
518 while (bits < (unsigned)(n)) \
524 ((unsigned)hold & ((1U << (n)) - 1))
527 #define DROPBITS(n) \
530 bits -= (unsigned)(n); \
628 unsigned char FAR *put;
640 unsigned char hbuf[4];
642 static const unsigned short order[19] =
643 {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
656 switch (
state->mode) {
658 if (
state->wrap == 0) {
664 if ((
state->wrap & 2) &&
hold == 0x8b1f) {
665 if (
state->wbits == 0)
675 state->head->done = -1;
676 if (!(
state->wrap & 1) ||
680 ((
BITS(8) << 8) + (
hold >> 8)) % 31) {
681 strm->msg = (
char *)
"incorrect header check";
686 strm->msg = (
char *)
"unknown compression method";
692 if (
state->wbits == 0)
695 strm->msg = (
char *)
"invalid window size";
710 strm->msg = (
char *)
"unknown compression method";
714 if (
state->flags & 0xe000) {
715 strm->msg = (
char *)
"unknown header flags set";
721 if ((
state->flags & 0x0200) && (
state->wrap & 4))
729 if ((
state->flags & 0x0200) && (
state->wrap & 4))
739 if ((
state->flags & 0x0200) && (
state->wrap & 4))
744 if (
state->flags & 0x0400) {
749 if ((
state->flags & 0x0200) && (
state->wrap & 4))
757 if (
state->flags & 0x0400) {
768 if ((
state->flags & 0x0200) && (
state->wrap & 4))
774 if (
state->length)
goto inf_leave;
779 if (
state->flags & 0x0800) {
780 if (
have == 0)
goto inf_leave;
789 if ((
state->flags & 0x0200) && (
state->wrap & 4))
793 if (
len)
goto inf_leave;
800 if (
state->flags & 0x1000) {
801 if (
have == 0)
goto inf_leave;
810 if ((
state->flags & 0x0200) && (
state->wrap & 4))
814 if (
len)
goto inf_leave;
820 if (
state->flags & 0x0200) {
823 strm->msg = (
char *)
"header crc mismatch";
831 state->head->done = 1;
843 if (
state->havedict == 0) {
863 state->last ?
" (last)" :
""));
869 state->last ?
" (last)" :
""));
878 state->last ?
" (last)" :
""));
882 strm->msg = (
char *)
"invalid block type";
890 if ((
hold & 0xffff) != ((
hold >> 16) ^ 0xffff)) {
891 strm->msg = (
char *)
"invalid stored block lengths";
900 if (flush ==
Z_TREES)
goto inf_leave;
908 if (
copy == 0)
goto inf_leave;
928 #ifndef PKZIP_BUG_WORKAROUND
930 strm->msg = (
char *)
"too many length or distance symbols";
944 while (
state->have < 19)
952 strm->msg = (
char *)
"invalid code lengths set";
963 if ((
unsigned)(here.
bits) <=
bits)
break;
971 if (here.
val == 16) {
974 if (
state->have == 0) {
975 strm->msg = (
char *)
"invalid bit length repeat";
983 else if (here.
val == 17) {
998 strm->msg = (
char *)
"invalid bit length repeat";
1011 if (
state->lens[256] == 0) {
1012 strm->msg = (
char *)
"invalid code -- missing end-of-block";
1026 strm->msg = (
char *)
"invalid literal/lengths set";
1031 state->distbits = 6;
1035 strm->msg = (
char *)
"invalid distances set";
1041 if (flush ==
Z_TREES)
goto inf_leave;
1045 if (
have >= 6 && left >= 258) {
1056 if ((
unsigned)(here.
bits) <=
bits)
break;
1059 if (here.
op && (here.
op & 0xf0) == 0) {
1072 state->length = (unsigned)here.
val;
1073 if ((
int)(here.
op) == 0) {
1075 "inflate: literal '%c'\n" :
1076 "inflate: literal 0x%02x\n", here.
val));
1087 strm->msg = (
char *)
"invalid literal/length code";
1091 state->extra = (unsigned)(here.
op) & 15;
1106 if ((
unsigned)(here.
bits) <=
bits)
break;
1109 if ((here.
op & 0xf0) == 0) {
1123 strm->msg = (
char *)
"invalid distance code";
1127 state->offset = (unsigned)here.
val;
1128 state->extra = (
unsigned)(here.
op) & 15;
1137 #ifdef INFLATE_STRICT
1139 strm->msg = (
char *)
"invalid distance too far back";
1147 if (left == 0)
goto inf_leave;
1153 strm->msg = (
char *)
"invalid distance too far back";
1157 #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
1192 if (left == 0)
goto inf_leave;
1193 *put++ = (
unsigned char)(
state->length);
1207 if ((
state->wrap & 4) && (
1212 strm->msg = (
char *)
"incorrect data check";
1224 if (
hold != (
state->total & 0xffffffffUL)) {
1225 strm->msg = (
char *)
"incorrect length check";
1309 if (dictLength !=
Z_NULL)
1310 *dictLength =
state->whave;
1320 unsigned long dictid;
1333 if (dictid !=
state->check)
1344 state->havedict = 1;
1379 const unsigned char FAR *
buf;
1387 while (
next <
len && got < 4) {
1388 if ((
int)(
buf[
next]) == (got < 2 ? 0 : 0xff))
1404 unsigned long in,
out;
1405 unsigned char buf[4];
1419 while (
state->bits >= 8) {
1482 ZALLOC(source, 1U <<
state->wbits,
sizeof(
unsigned char));
1516 #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
1517 state->sane = !subvert;
1549 return (
long)(((
unsigned long)((
long)
state->back)) << 16) +
int ZEXPORT inflateUndermine(z_streamp strm, int subvert)
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len)
int fixed(struct state *s)
int ZEXPORT inflateEnd(z_streamp strm)
unsigned char FAR * window
int ZEXPORT inflateSync(z_streamp strm)
int ZEXPORT inflate(z_streamp strm, int flush)
int inflateStateCheck(z_streamp strm)
unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, unsigned len)
static int copy(grpc_slice_buffer *input, grpc_slice_buffer *output)
_Use_decl_annotations_ int __cdecl printf(const char *_Format,...)
int ZEXPORT inflateReset2(z_streamp strm, int windowBits)
gz_header FAR * gz_headerp
void fixedtables(struct inflate_state FAR *state)
#define ZALLOC(strm, items, size)
voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size)
int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength)
#define CRC2(check, word)
void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr)
#define UPDATE(check, buf, len)
long ZEXPORT inflateMark(z_streamp strm)
int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, unsigned codes, code FAR *FAR *table, unsigned FAR *bits, unsigned short FAR *work)
int inflateStateCheck OF((z_streamp strm))
static const code lenfix[512]
OPENSSL_EXPORT ASN1_BIT_STRING * bits
#define ZFREE(strm, addr)
int ZEXPORT inflateResetKeep(z_streamp strm)
int ZEXPORT inflatePrime(z_streamp strm, int bits, int value)
static const code distfix[32]
void inflate_fast(z_streamp strm, unsigned start)
int ZEXPORT inflateSyncPoint(z_streamp strm)
int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, const char *version, int stream_size)
int ZEXPORT inflateReset(z_streamp strm)
UniquePtr< SSL_SESSION > ret
AllocList * next[kMaxLevel]
int ZEXPORT inflateInit_(z_streamp strm, const char *version, int stream_size)
int updatewindow(z_streamp strm, const Bytef *end, unsigned copy)
int ZEXPORT inflateCopy(z_streamp dest, z_streamp source)
static void check(upb_inttable *t)
int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength)
int ZEXPORT inflateValidate(z_streamp strm, int check)
#define CRC4(check, word)
static const char dictionary[]
void ZLIB_INTERNAL zmemcpy(Bytef *dest, const Bytef *source, uInt len)
unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, uInt len)
int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head)
if(p->owned &&p->wrapped !=NULL)
static struct rpc_state state
unsigned long ZEXPORT inflateCodesUsed(z_streamp strm)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:03