Lines Matching defs:stream
45 struct z_stream_s *stream = &ctx->comp_stream;
47 stream->workspace = vzalloc(zlib_deflate_workspacesize(
49 if (!stream->workspace) {
54 ret = zlib_deflateInit(stream, 3);
56 ret = zlib_deflateInit2(stream, DEFLATE_DEF_LEVEL, Z_DEFLATED,
67 vfree(stream->workspace);
74 struct z_stream_s *stream = &ctx->decomp_stream;
76 stream->workspace = vzalloc(zlib_inflate_workspacesize());
77 if (!stream->workspace) {
82 ret = zlib_inflateInit(stream);
84 ret = zlib_inflateInit2(stream, -DEFLATE_DEF_WINBITS);
92 vfree(stream->workspace);
181 struct z_stream_s *stream = &dctx->comp_stream;
183 ret = zlib_deflateReset(stream);
189 stream->next_in = (u8 *)src;
190 stream->avail_in = slen;
191 stream->next_out = (u8 *)dst;
192 stream->avail_out = *dlen;
194 ret = zlib_deflate(stream, Z_FINISH);
200 *dlen = stream->total_out;
226 struct z_stream_s *stream = &dctx->decomp_stream;
228 ret = zlib_inflateReset(stream);
234 stream->next_in = (u8 *)src;
235 stream->avail_in = slen;
236 stream->next_out = (u8 *)dst;
237 stream->avail_out = *dlen;
239 ret = zlib_inflate(stream, Z_SYNC_FLUSH);
245 if (ret == Z_OK && !stream->avail_in && stream->avail_out) {
247 stream->next_in = &zerostuff;
248 stream->avail_in = 1;
249 ret = zlib_inflate(stream, Z_FINISH);
256 *dlen = stream->total_out;