Lines Matching refs:zstream

250 	struct z_stream_s zstream;  member
256 struct z_stream_s *zstream = &c->zstream; in compress_init() local
261 zstream->workspace = in compress_init()
264 if (!zstream->workspace) { in compress_init()
278 struct z_stream_s *zstream = &c->zstream; in compress_start() local
279 void *workspace = zstream->workspace; in compress_start()
281 memset(zstream, 0, sizeof(*zstream)); in compress_start()
282 zstream->workspace = workspace; in compress_start()
284 return zlib_deflateInit(zstream, Z_DEFAULT_COMPRESSION) == Z_OK; in compress_start()
307 struct z_stream_s *zstream = &c->zstream; in compress_page() local
309 zstream->next_in = src; in compress_page()
311 zstream->next_in = c->tmp; in compress_page()
312 zstream->avail_in = PAGE_SIZE; in compress_page()
315 if (zstream->avail_out == 0) { in compress_page()
316 zstream->next_out = compress_next_page(c, dst); in compress_page()
317 if (IS_ERR(zstream->next_out)) in compress_page()
318 return PTR_ERR(zstream->next_out); in compress_page()
320 zstream->avail_out = PAGE_SIZE; in compress_page()
323 if (zlib_deflate(zstream, Z_NO_FLUSH) != Z_OK) in compress_page()
327 } while (zstream->avail_in); in compress_page()
330 if (0 && zstream->total_out > zstream->total_in) in compress_page()
339 struct z_stream_s *zstream = &c->zstream; in compress_flush() local
342 switch (zlib_deflate(zstream, Z_FINISH)) { in compress_flush()
344 zstream->next_out = compress_next_page(c, dst); in compress_flush()
345 if (IS_ERR(zstream->next_out)) in compress_flush()
346 return PTR_ERR(zstream->next_out); in compress_flush()
348 zstream->avail_out = PAGE_SIZE; in compress_flush()
360 memset(zstream->next_out, 0, zstream->avail_out); in compress_flush()
361 dst->unused = zstream->avail_out; in compress_flush()
367 zlib_deflateEnd(&c->zstream); in compress_finish()
372 kfree(c->zstream.workspace); in compress_fini()