• Home
  • Raw
  • Download

Lines Matching refs:strm

24 	z_stream strm;  member
61 kvfree(workspace->strm.workspace); in zlib_free_workspace()
77 workspace->strm.workspace = kvmalloc(workspacesize, GFP_KERNEL); in zlib_alloc_workspace()
80 if (!workspace->strm.workspace || !workspace->buf) in zlib_alloc_workspace()
115 if (Z_OK != zlib_deflateInit(&workspace->strm, workspace->level)) { in zlib_compress_pages()
121 workspace->strm.total_in = 0; in zlib_compress_pages()
122 workspace->strm.total_out = 0; in zlib_compress_pages()
136 workspace->strm.next_in = data_in; in zlib_compress_pages()
137 workspace->strm.next_out = cpage_out; in zlib_compress_pages()
138 workspace->strm.avail_out = PAGE_SIZE; in zlib_compress_pages()
139 workspace->strm.avail_in = min(len, PAGE_SIZE); in zlib_compress_pages()
141 while (workspace->strm.total_in < len) { in zlib_compress_pages()
142 ret = zlib_deflate(&workspace->strm, Z_SYNC_FLUSH); in zlib_compress_pages()
146 zlib_deflateEnd(&workspace->strm); in zlib_compress_pages()
152 if (workspace->strm.total_in > 8192 && in zlib_compress_pages()
153 workspace->strm.total_in < in zlib_compress_pages()
154 workspace->strm.total_out) { in zlib_compress_pages()
162 if (workspace->strm.avail_out == 0) { in zlib_compress_pages()
177 workspace->strm.avail_out = PAGE_SIZE; in zlib_compress_pages()
178 workspace->strm.next_out = cpage_out; in zlib_compress_pages()
181 if (workspace->strm.total_in >= len) in zlib_compress_pages()
185 if (workspace->strm.avail_in == 0) { in zlib_compress_pages()
186 if (workspace->strm.total_out > max_out) in zlib_compress_pages()
189 bytes_left = len - workspace->strm.total_in; in zlib_compress_pages()
197 workspace->strm.avail_in = min(bytes_left, in zlib_compress_pages()
199 workspace->strm.next_in = data_in; in zlib_compress_pages()
202 workspace->strm.avail_in = 0; in zlib_compress_pages()
203 ret = zlib_deflate(&workspace->strm, Z_FINISH); in zlib_compress_pages()
204 zlib_deflateEnd(&workspace->strm); in zlib_compress_pages()
211 if (workspace->strm.total_out >= workspace->strm.total_in) { in zlib_compress_pages()
217 *total_out = workspace->strm.total_out; in zlib_compress_pages()
218 *total_in = workspace->strm.total_in; in zlib_compress_pages()
247 workspace->strm.next_in = data_in; in zlib_decompress_bio()
248 workspace->strm.avail_in = min_t(size_t, srclen, PAGE_SIZE); in zlib_decompress_bio()
249 workspace->strm.total_in = 0; in zlib_decompress_bio()
251 workspace->strm.total_out = 0; in zlib_decompress_bio()
252 workspace->strm.next_out = workspace->buf; in zlib_decompress_bio()
253 workspace->strm.avail_out = PAGE_SIZE; in zlib_decompress_bio()
262 workspace->strm.next_in += 2; in zlib_decompress_bio()
263 workspace->strm.avail_in -= 2; in zlib_decompress_bio()
266 if (Z_OK != zlib_inflateInit2(&workspace->strm, wbits)) { in zlib_decompress_bio()
271 while (workspace->strm.total_in < srclen) { in zlib_decompress_bio()
272 ret = zlib_inflate(&workspace->strm, Z_NO_FLUSH); in zlib_decompress_bio()
277 total_out = workspace->strm.total_out; in zlib_decompress_bio()
291 workspace->strm.next_out = workspace->buf; in zlib_decompress_bio()
292 workspace->strm.avail_out = PAGE_SIZE; in zlib_decompress_bio()
294 if (workspace->strm.avail_in == 0) { in zlib_decompress_bio()
303 workspace->strm.next_in = data_in; in zlib_decompress_bio()
304 tmp = srclen - workspace->strm.total_in; in zlib_decompress_bio()
305 workspace->strm.avail_in = min(tmp, in zlib_decompress_bio()
314 zlib_inflateEnd(&workspace->strm); in zlib_decompress_bio()
338 workspace->strm.next_in = data_in; in zlib_decompress()
339 workspace->strm.avail_in = srclen; in zlib_decompress()
340 workspace->strm.total_in = 0; in zlib_decompress()
342 workspace->strm.next_out = workspace->buf; in zlib_decompress()
343 workspace->strm.avail_out = PAGE_SIZE; in zlib_decompress()
344 workspace->strm.total_out = 0; in zlib_decompress()
352 workspace->strm.next_in += 2; in zlib_decompress()
353 workspace->strm.avail_in -= 2; in zlib_decompress()
356 if (Z_OK != zlib_inflateInit2(&workspace->strm, wbits)) { in zlib_decompress()
366 ret = zlib_inflate(&workspace->strm, Z_NO_FLUSH); in zlib_decompress()
371 total_out = workspace->strm.total_out; in zlib_decompress()
397 workspace->strm.next_out = workspace->buf; in zlib_decompress()
398 workspace->strm.avail_out = PAGE_SIZE; in zlib_decompress()
406 zlib_inflateEnd(&workspace->strm); in zlib_decompress()