Lines Matching refs:zstream
476 struct z_stream_s zstream; in zlib_inflate() local
479 memset(&zstream, 0, sizeof(zstream)); in zlib_inflate()
481 zstream.next_in = (unsigned char *)compressed_data; in zlib_inflate()
482 zstream.avail_in = compressed_len; in zlib_inflate()
484 if (inflateInit(&zstream) != Z_OK) in zlib_inflate()
488 zstream.next_out = out; in zlib_inflate()
489 zstream.avail_out = 4096; in zlib_inflate()
492 switch (inflate(&zstream, Z_SYNC_FLUSH)) { in zlib_inflate()
498 inflateEnd(&zstream); in zlib_inflate()
502 if (zstream.avail_out) in zlib_inflate()
505 out = realloc(out, 2*zstream.total_out); in zlib_inflate()
507 inflateEnd(&zstream); in zlib_inflate()
511 zstream.next_out = (unsigned char *)out + zstream.total_out; in zlib_inflate()
512 zstream.avail_out = zstream.total_out; in zlib_inflate()
515 inflateEnd(&zstream); in zlib_inflate()
517 return zstream.total_out; in zlib_inflate()