Lines Matching refs:zstream
604 struct z_stream_s zstream; in zlib_inflate() local
607 memset(&zstream, 0, sizeof(zstream)); in zlib_inflate()
609 zstream.next_in = (unsigned char *)compressed_data; in zlib_inflate()
610 zstream.avail_in = compressed_len; in zlib_inflate()
612 if (inflateInit(&zstream) != Z_OK) in zlib_inflate()
616 zstream.next_out = out; in zlib_inflate()
617 zstream.avail_out = 4096; in zlib_inflate()
620 switch (inflate(&zstream, Z_SYNC_FLUSH)) { in zlib_inflate()
626 inflateEnd(&zstream); in zlib_inflate()
630 if (zstream.avail_out) in zlib_inflate()
633 out = realloc(out, 2*zstream.total_out); in zlib_inflate()
635 inflateEnd(&zstream); in zlib_inflate()
639 zstream.next_out = (unsigned char *)out + zstream.total_out; in zlib_inflate()
640 zstream.avail_out = zstream.total_out; in zlib_inflate()
643 inflateEnd(&zstream); in zlib_inflate()
645 return zstream.total_out; in zlib_inflate()