Lines Matching refs:stream
45 struct z_stream_s *stream = &ctx->comp_stream;
47 stream->workspace = vzalloc(zlib_deflate_workspacesize(
49 if (!stream->workspace) {
53 ret = zlib_deflateInit2(stream, DEFLATE_DEF_LEVEL, Z_DEFLATED,
63 vfree(stream->workspace);
70 struct z_stream_s *stream = &ctx->decomp_stream;
72 stream->workspace = vzalloc(zlib_inflate_workspacesize());
73 if (!stream->workspace) {
77 ret = zlib_inflateInit2(stream, -DEFLATE_DEF_WINBITS);
85 vfree(stream->workspace);
164 struct z_stream_s *stream = &dctx->comp_stream;
166 ret = zlib_deflateReset(stream);
172 stream->next_in = (u8 *)src;
173 stream->avail_in = slen;
174 stream->next_out = (u8 *)dst;
175 stream->avail_out = *dlen;
177 ret = zlib_deflate(stream, Z_FINISH);
183 *dlen = stream->total_out;
209 struct z_stream_s *stream = &dctx->decomp_stream;
211 ret = zlib_inflateReset(stream);
217 stream->next_in = (u8 *)src;
218 stream->avail_in = slen;
219 stream->next_out = (u8 *)dst;
220 stream->avail_out = *dlen;
222 ret = zlib_inflate(stream, Z_SYNC_FLUSH);
228 if (ret == Z_OK && !stream->avail_in && stream->avail_out) {
230 stream->next_in = &zerostuff;
231 stream->avail_in = 1;
232 ret = zlib_inflate(stream, Z_FINISH);
239 *dlen = stream->total_out;