Lines Matching refs:stream

26 	z_stream *stream = kmalloc(sizeof(z_stream), GFP_KERNEL);  in zlib_init()  local
27 if (stream == NULL) in zlib_init()
29 stream->workspace = vmalloc(zlib_inflate_workspacesize()); in zlib_init()
30 if (stream->workspace == NULL) in zlib_init()
33 return stream; in zlib_init()
37 kfree(stream); in zlib_init()
44 z_stream *stream = strm; in zlib_free() local
46 if (stream) in zlib_free()
47 vfree(stream->workspace); in zlib_free()
48 kfree(stream); in zlib_free()
59 z_stream *stream = strm; in zlib_uncompress() local
61 stream->avail_out = PAGE_SIZE; in zlib_uncompress()
62 stream->next_out = squashfs_first_page(output); in zlib_uncompress()
63 stream->avail_in = 0; in zlib_uncompress()
65 if (IS_ERR(stream->next_out)) { in zlib_uncompress()
66 error = PTR_ERR(stream->next_out); in zlib_uncompress()
73 if (stream->avail_in == 0) { in zlib_uncompress()
86 stream->next_in = data + offset; in zlib_uncompress()
87 stream->avail_in = avail; in zlib_uncompress()
91 if (stream->avail_out == 0) { in zlib_uncompress()
92 stream->next_out = squashfs_next_page(output); in zlib_uncompress()
93 if (IS_ERR(stream->next_out)) { in zlib_uncompress()
94 error = PTR_ERR(stream->next_out); in zlib_uncompress()
96 } else if (stream->next_out != NULL) in zlib_uncompress()
97 stream->avail_out = PAGE_SIZE; in zlib_uncompress()
101 zlib_err = zlib_inflateInit(stream); in zlib_uncompress()
109 zlib_err = zlib_inflate(stream, Z_SYNC_FLUSH); in zlib_uncompress()
122 if (zlib_inflateEnd(stream) != Z_OK) in zlib_uncompress()
125 return error ? error : stream->total_out; in zlib_uncompress()