Lines Matching refs:zstream
47 struct z_stream_s zstream; in zlib_inflate() local
51 memset(&zstream, 0, sizeof(zstream)); in zlib_inflate()
53 zstream.next_in = (unsigned char *)*ptr; in zlib_inflate()
54 zstream.avail_in = 4*len; in zlib_inflate()
56 if (inflateInit(&zstream) != Z_OK) in zlib_inflate()
60 zstream.next_out = out; in zlib_inflate()
61 zstream.avail_out = out_size; in zlib_inflate()
64 switch (inflate(&zstream, Z_SYNC_FLUSH)) { in zlib_inflate()
70 inflateEnd(&zstream); in zlib_inflate()
74 if (zstream.avail_out) in zlib_inflate()
77 out = realloc(out, 2*zstream.total_out); in zlib_inflate()
79 inflateEnd(&zstream); in zlib_inflate()
83 zstream.next_out = (unsigned char *)out + zstream.total_out; in zlib_inflate()
84 zstream.avail_out = zstream.total_out; in zlib_inflate()
87 inflateEnd(&zstream); in zlib_inflate()
90 return zstream.total_out / 4; in zlib_inflate()