• Home
  • Raw
  • Download

Lines Matching full:zp

136 static CURLcode process_trailer(struct connectdata *conn, zlib_params *zp)  in process_trailer()  argument
138 z_stream *z = &zp->z; in process_trailer()
140 uInt len = z->avail_in < zp->trailerlen? z->avail_in: zp->trailerlen; in process_trailer()
145 zp->trailerlen -= len; in process_trailer()
150 if(result || !zp->trailerlen) in process_trailer()
151 result = exit_zlib(conn, z, &zp->zlib_init, result); in process_trailer()
154 zp->zlib_init = ZLIB_EXTERNAL_TRAILER; in process_trailer()
162 zlib_params *zp = (zlib_params *) &writer->params; in inflate_stream() local
163 z_stream *z = &zp->z; /* zlib state structure */ in inflate_stream()
171 if(zp->zlib_init != ZLIB_INIT && in inflate_stream()
172 zp->zlib_init != ZLIB_INFLATING && in inflate_stream()
173 zp->zlib_init != ZLIB_INIT_GZIP && in inflate_stream()
174 zp->zlib_init != ZLIB_GZIP_INFLATING) in inflate_stream()
175 return exit_zlib(conn, z, &zp->zlib_init, CURLE_WRITE_ERROR); in inflate_stream()
181 return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); in inflate_stream()
204 zp->zlib_init = started; /* Data started. */ in inflate_stream()
208 exit_zlib(conn, z, &zp->zlib_init, result); in inflate_stream()
224 result = process_trailer(conn, zp); in inflate_stream()
229 if(zp->zlib_init == ZLIB_INIT) { in inflate_stream()
235 zp->zlib_init = ZLIB_INFLATING; in inflate_stream()
236 zp->trailerlen = 4; /* Tolerate up to 4 unknown trailer bytes. */ in inflate_stream()
240 zp->zlib_init = ZLIB_UNINIT; /* inflateEnd() already called. */ in inflate_stream()
244 result = exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z)); in inflate_stream()
253 if(nread && zp->zlib_init == ZLIB_INIT) in inflate_stream()
254 zp->zlib_init = started; /* Cannot restart anymore. */ in inflate_stream()
264 zlib_params *zp = (zlib_params *) &writer->params; in deflate_init_writer() local
265 z_stream *z = &zp->z; /* zlib state structure */ in deflate_init_writer()
276 zp->zlib_init = ZLIB_INIT; in deflate_init_writer()
284 zlib_params *zp = (zlib_params *) &writer->params; in deflate_unencode_write() local
285 z_stream *z = &zp->z; /* zlib state structure */ in deflate_unencode_write()
291 if(zp->zlib_init == ZLIB_EXTERNAL_TRAILER) in deflate_unencode_write()
292 return process_trailer(conn, zp); in deflate_unencode_write()
301 zlib_params *zp = (zlib_params *) &writer->params; in deflate_close_writer() local
302 z_stream *z = &zp->z; /* zlib state structure */ in deflate_close_writer()
304 exit_zlib(conn, z, &zp->zlib_init, CURLE_OK); in deflate_close_writer()
321 zlib_params *zp = (zlib_params *) &writer->params; in gzip_init_writer() local
322 z_stream *z = &zp->z; /* zlib state structure */ in gzip_init_writer()
336 zp->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */ in gzip_init_writer()
343 zp->trailerlen = 8; /* A CRC-32 and a 32-bit input size (RFC 1952, 2.2) */ in gzip_init_writer()
344 zp->zlib_init = ZLIB_INIT; /* Initial call state */ in gzip_init_writer()
438 zlib_params *zp = (zlib_params *) &writer->params; in gzip_unencode_write() local
439 z_stream *z = &zp->z; /* zlib state structure */ in gzip_unencode_write()
441 if(zp->zlib_init == ZLIB_INIT_GZIP) { in gzip_unencode_write()
452 return exit_zlib(conn, z, &zp->zlib_init, CURLE_WRITE_ERROR); in gzip_unencode_write()
465 switch(zp->zlib_init) { in gzip_unencode_write()
476 zp->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ in gzip_unencode_write()
490 return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); in gzip_unencode_write()
493 zp->zlib_init = ZLIB_GZIP_HEADER; /* Need more gzip header data state */ in gzip_unencode_write()
499 return exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z)); in gzip_unencode_write()
512 return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); in gzip_unencode_write()
524 zp->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ in gzip_unencode_write()
533 return exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z)); in gzip_unencode_write()
542 return process_trailer(conn, zp); in gzip_unencode_write()
565 zlib_params *zp = (zlib_params *) &writer->params; in gzip_close_writer() local
566 z_stream *z = &zp->z; /* zlib state structure */ in gzip_close_writer()
568 exit_zlib(conn, z, &zp->zlib_init, CURLE_OK); in gzip_close_writer()