Lines Matching refs:stream
39 z_stream *stream = kmalloc(sizeof(z_stream), GFP_KERNEL); in zlib_init() local
40 if (stream == NULL) in zlib_init()
42 stream->workspace = vmalloc(zlib_inflate_workspacesize()); in zlib_init()
43 if (stream->workspace == NULL) in zlib_init()
46 return stream; in zlib_init()
50 kfree(stream); in zlib_init()
57 z_stream *stream = strm; in zlib_free() local
59 if (stream) in zlib_free()
60 vfree(stream->workspace); in zlib_free()
61 kfree(stream); in zlib_free()
70 z_stream *stream = strm; in zlib_uncompress() local
72 stream->avail_out = PAGE_CACHE_SIZE; in zlib_uncompress()
73 stream->next_out = squashfs_first_page(output); in zlib_uncompress()
74 stream->avail_in = 0; in zlib_uncompress()
77 if (stream->avail_in == 0 && k < b) { in zlib_uncompress()
80 stream->next_in = bh[k]->b_data + offset; in zlib_uncompress()
81 stream->avail_in = avail; in zlib_uncompress()
85 if (stream->avail_out == 0) { in zlib_uncompress()
86 stream->next_out = squashfs_next_page(output); in zlib_uncompress()
87 if (stream->next_out != NULL) in zlib_uncompress()
88 stream->avail_out = PAGE_CACHE_SIZE; in zlib_uncompress()
92 zlib_err = zlib_inflateInit(stream); in zlib_uncompress()
100 zlib_err = zlib_inflate(stream, Z_SYNC_FLUSH); in zlib_uncompress()
102 if (stream->avail_in == 0 && k < b) in zlib_uncompress()
111 zlib_err = zlib_inflateEnd(stream); in zlib_uncompress()
118 return stream->total_out; in zlib_uncompress()