Lines Matching refs:zstream
536 struct z_stream_s zstream; in zlib_inflate() local
539 memset(&zstream, 0, sizeof(zstream)); in zlib_inflate()
541 zstream.next_in = (unsigned char *)compressed_data; in zlib_inflate()
542 zstream.avail_in = compressed_len; in zlib_inflate()
544 if (inflateInit(&zstream) != Z_OK) in zlib_inflate()
548 zstream.next_out = out; in zlib_inflate()
549 zstream.avail_out = 4096; in zlib_inflate()
552 switch (inflate(&zstream, Z_SYNC_FLUSH)) { in zlib_inflate()
558 inflateEnd(&zstream); in zlib_inflate()
562 if (zstream.avail_out) in zlib_inflate()
565 out = realloc(out, 2*zstream.total_out); in zlib_inflate()
567 inflateEnd(&zstream); in zlib_inflate()
571 zstream.next_out = (unsigned char *)out + zstream.total_out; in zlib_inflate()
572 zstream.avail_out = zstream.total_out; in zlib_inflate()
575 inflateEnd(&zstream); in zlib_inflate()
577 return zstream.total_out; in zlib_inflate()