Lines Matching refs:zstream
176 struct z_stream_s zstream = { in pstore_compress() local
188 ret = zlib_deflateInit2(&zstream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, in pstore_compress()
193 ret = zlib_deflate(&zstream, Z_FINISH); in pstore_compress()
197 ret = zlib_deflateEnd(&zstream); in pstore_compress()
201 return zstream.total_out; in pstore_compress()
583 struct z_stream_s *zstream) in decompress_record() argument
600 if (!zstream->workspace) { in decompress_record()
605 ret = zlib_inflateReset(zstream); in decompress_record()
618 zstream->next_in = record->buf; in decompress_record()
619 zstream->avail_in = record->size; in decompress_record()
620 zstream->next_out = workspace; in decompress_record()
621 zstream->avail_out = max_uncompressed_size; in decompress_record()
623 ret = zlib_inflate(zstream, Z_FINISH); in decompress_record()
630 unzipped_len = zstream->total_out; in decompress_record()
661 struct z_stream_s zstream = {}; in pstore_get_backend_records() local
667 zstream.workspace = kvmalloc(zlib_inflate_workspacesize(), in pstore_get_backend_records()
669 zlib_inflateInit2(&zstream, -DEF_WBITS); in pstore_get_backend_records()
700 decompress_record(record, &zstream); in pstore_get_backend_records()
717 if (zlib_inflateEnd(&zstream) != Z_OK) in pstore_get_backend_records()
719 kvfree(zstream.workspace); in pstore_get_backend_records()