Lines Matching defs:strm
26 * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset)
59 * input in strm.
96 local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
104 int ZEXPORT inflateResetKeep(strm)
105 z_streamp strm;
109 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
110 state = (struct inflate_state FAR *)strm->state;
111 strm->total_in = strm->total_out = state->total = 0;
112 strm->msg = Z_NULL;
114 strm->adler = state->wrap & 1;
129 int ZEXPORT inflateReset(strm)
130 z_streamp strm;
134 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
135 state = (struct inflate_state FAR *)strm->state;
139 return inflateResetKeep(strm);
142 int ZEXPORT inflateReset2(strm, windowBits)
143 z_streamp strm;
150 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
151 state = (struct inflate_state FAR *)strm->state;
170 ZFREE(strm, state->window);
177 return inflateReset(strm);
180 int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
181 z_streamp strm;
192 if (strm == Z_NULL) return Z_STREAM_ERROR;
193 strm->msg = Z_NULL; /* in case we return an error */
194 if (strm->zalloc == (alloc_func)0) {
198 strm->zalloc = zcalloc;
199 strm->opaque = (voidpf)0;
202 if (strm->zfree == (free_func)0)
206 strm->zfree = zcfree;
209 ZALLOC(strm, 1, sizeof(struct inflate_state));
212 strm->state = (struct internal_state FAR *)state;
214 ret = inflateReset2(strm, windowBits);
216 ZFREE(strm, state);
217 strm->state = Z_NULL;
222 int ZEXPORT inflateInit_(strm, version, stream_size)
223 z_streamp strm;
227 return inflateInit2_(strm, DEF_WBITS, version, stream_size);
230 int ZEXPORT inflatePrime(strm, bits, value)
231 z_streamp strm;
237 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
238 state = (struct inflate_state FAR *)strm->state;
379 local int updatewindow(strm, end, copy)
380 z_streamp strm;
387 state = (struct inflate_state FAR *)strm->state;
392 ZALLOC(strm, 1U << state->wbits,
461 put = strm->next_out; \
462 left = strm->avail_out; \
463 next = strm->next_in; \
464 have = strm->avail_in; \
472 strm->next_out = put; \
473 strm->avail_out = left; \
474 strm->next_in = next; \
475 strm->avail_in = have; \
588 Progress is defined as a change in either strm->avail_in or strm->avail_out.
596 strm->next_out, given the space available and the provided input--the effect
605 int ZEXPORT inflate(strm, flush)
606 z_streamp strm;
628 if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
629 (strm->next_in == Z_NULL && strm->avail_in != 0))
632 state = (struct inflate_state FAR *)strm->state;
662 strm->msg = (char *)"incorrect header check";
667 strm->msg = (char *)"unknown compression method";
676 strm->msg = (char *)"invalid window size";
682 strm->adler = state->check = adler32(0L, Z_NULL, 0);
691 strm->msg = (char *)"unknown compression method";
696 strm->msg = (char *)"unknown header flags set";
800 strm->msg = (char *)"header crc mismatch";
810 strm->adler = state->check = crc32(0L, Z_NULL, 0);
816 strm->adler = state->check = ZSWAP32(hold);
824 strm->adler = state->check = adler32(0L, Z_NULL, 0);
859 strm->msg = (char *)"invalid block type";
868 strm->msg = (char *)"invalid stored block lengths";
907 strm->msg = (char *)"too many length or distance symbols";
929 strm->msg = (char *)"invalid code lengths set";
952 strm->msg = (char *)"invalid bit length repeat";
975 strm->msg = (char *)"invalid bit length repeat";
989 strm->msg = (char *)"invalid code -- missing end-of-block";
1003 strm->msg = (char *)"invalid literal/lengths set";
1012 strm->msg = (char *)"invalid distances set";
1024 inflate_fast(strm, out);
1064 strm->msg = (char *)"invalid literal/length code";
1100 strm->msg = (char *)"invalid distance code";
1116 strm->msg = (char *)"invalid distance too far back";
1130 strm->msg = (char *)"invalid distance too far back";
1178 strm->total_out += out;
1181 strm->adler = state->check =
1189 strm->msg = (char *)"incorrect data check";
1202 strm->msg = (char *)"incorrect length check";
1232 if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
1234 if (updatewindow(strm, strm->next_out, out - strm->avail_out)) {
1238 in -= strm->avail_in;
1239 out -= strm->avail_out;
1240 strm->total_in += in;
1241 strm->total_out += out;
1244 strm->adler = state->check =
1245 UPDATE(state->check, strm->next_out - out, out);
1246 strm->data_type = state->bits + (state->last ? 64 : 0) +
1254 int ZEXPORT inflateEnd(strm)
1255 z_streamp strm;
1258 if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
1260 state = (struct inflate_state FAR *)strm->state;
1261 if (state->window != Z_NULL) ZFREE(strm, state->window);
1262 ZFREE(strm, strm->state);
1263 strm->state = Z_NULL;
1268 int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength)
1269 z_streamp strm;
1276 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
1277 state = (struct inflate_state FAR *)strm->state;
1291 int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
1292 z_streamp strm;
1301 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
1302 state = (struct inflate_state FAR *)strm->state;
1316 ret = updatewindow(strm, dictionary + dictLength, dictLength);
1326 int ZEXPORT inflateGetHeader(strm, head)
1327 z_streamp strm;
1333 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
1334 state = (struct inflate_state FAR *)strm->state;
1377 int ZEXPORT inflateSync(strm)
1378 z_streamp strm;
1386 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
1387 state = (struct inflate_state FAR *)strm->state;
1388 if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
1406 len = syncsearch(&(state->have), strm->next_in, strm->avail_in);
1407 strm->avail_in -= len;
1408 strm->next_in += len;
1409 strm->total_in += len;
1413 in = strm->total_in; out = strm->total_out;
1414 inflateReset(strm);
1415 strm->total_in = in; strm->total_out = out;
1428 int ZEXPORT inflateSyncPoint(strm)
1429 z_streamp strm;
1433 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
1434 state = (struct inflate_state FAR *)strm->state;
1485 int ZEXPORT inflateUndermine(strm, subvert)
1486 z_streamp strm;
1491 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
1492 state = (struct inflate_state FAR *)strm->state;
1502 long ZEXPORT inflateMark(strm)
1503 z_streamp strm;
1507 if (strm == Z_NULL || strm->state == Z_NULL) return -(1L << 16);
1508 state = (struct inflate_state FAR *)strm->state;