Lines Matching refs:zlib_init

85   zlibInitState zlib_init;   /* zlib init state */  member
122 z_stream *z, zlibInitState *zlib_init, CURLcode result) in exit_zlib() argument
124 if(*zlib_init == ZLIB_GZIP_HEADER) in exit_zlib()
127 if(*zlib_init != ZLIB_UNINIT) { in exit_zlib()
130 *zlib_init = ZLIB_UNINIT; in exit_zlib()
151 result = exit_zlib(conn, z, &zp->zlib_init, result); in process_trailer()
154 zp->zlib_init = ZLIB_EXTERNAL_TRAILER; in process_trailer()
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()
229 if(zp->zlib_init == ZLIB_INIT) { in inflate_stream()
235 zp->zlib_init = ZLIB_INFLATING; 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()
276 zp->zlib_init = ZLIB_INIT; in deflate_init_writer()
291 if(zp->zlib_init == ZLIB_EXTERNAL_TRAILER) in deflate_unencode_write()
304 exit_zlib(conn, z, &zp->zlib_init, CURLE_OK); in deflate_close_writer()
336 zp->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */ in gzip_init_writer()
344 zp->zlib_init = ZLIB_INIT; /* Initial call state */ in gzip_init_writer()
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()
568 exit_zlib(conn, z, &zp->zlib_init, CURLE_OK); in gzip_close_writer()