Lines Matching defs:strm

27 	z_stream strm;
50 kvfree(workspace->strm.workspace);
66 workspace->strm.workspace = kvzalloc(workspacesize, GFP_KERNEL | __GFP_NOWARN);
83 if (!workspace->strm.workspace || !workspace->buf)
115 if (Z_OK != zlib_deflateInit(&workspace->strm, workspace->level)) {
121 workspace->strm.total_in = 0;
122 workspace->strm.total_out = 0;
133 workspace->strm.next_in = workspace->buf;
134 workspace->strm.avail_in = 0;
135 workspace->strm.next_out = cpage_out;
136 workspace->strm.avail_out = PAGE_SIZE;
138 while (workspace->strm.total_in < len) {
143 if (workspace->strm.avail_in == 0) {
144 bytes_left = len - workspace->strm.total_in;
162 workspace->strm.next_in = workspace->buf;
172 workspace->strm.next_in = data_in;
174 workspace->strm.avail_in = min(bytes_left,
178 ret = zlib_deflate(&workspace->strm, Z_SYNC_FLUSH);
182 zlib_deflateEnd(&workspace->strm);
188 if (workspace->strm.total_in > 8192 &&
189 workspace->strm.total_in <
190 workspace->strm.total_out) {
198 if (workspace->strm.avail_out == 0) {
211 workspace->strm.avail_out = PAGE_SIZE;
212 workspace->strm.next_out = cpage_out;
215 if (workspace->strm.total_in >= len)
217 if (workspace->strm.total_out > max_out)
220 workspace->strm.avail_in = 0;
226 ret = zlib_deflate(&workspace->strm, Z_FINISH);
230 zlib_deflateEnd(&workspace->strm);
233 } else if (workspace->strm.avail_out == 0) {
247 workspace->strm.avail_out = PAGE_SIZE;
248 workspace->strm.next_out = cpage_out;
251 zlib_deflateEnd(&workspace->strm);
253 if (workspace->strm.total_out >= workspace->strm.total_in) {
259 *total_out = workspace->strm.total_out;
260 *total_in = workspace->strm.total_in;
285 workspace->strm.next_in = data_in;
286 workspace->strm.avail_in = min_t(size_t, srclen, PAGE_SIZE);
287 workspace->strm.total_in = 0;
289 workspace->strm.total_out = 0;
290 workspace->strm.next_out = workspace->buf;
291 workspace->strm.avail_out = workspace->buf_size;
300 workspace->strm.next_in += 2;
301 workspace->strm.avail_in -= 2;
304 if (Z_OK != zlib_inflateInit2(&workspace->strm, wbits)) {
309 while (workspace->strm.total_in < srclen) {
310 ret = zlib_inflate(&workspace->strm, Z_NO_FLUSH);
315 total_out = workspace->strm.total_out;
328 workspace->strm.next_out = workspace->buf;
329 workspace->strm.avail_out = workspace->buf_size;
331 if (workspace->strm.avail_in == 0) {
340 workspace->strm.next_in = data_in;
341 tmp = srclen - workspace->strm.total_in;
342 workspace->strm.avail_in = min(tmp, PAGE_SIZE);
350 zlib_inflateEnd(&workspace->strm);
365 workspace->strm.next_in = data_in;
366 workspace->strm.avail_in = srclen;
367 workspace->strm.total_in = 0;
369 workspace->strm.next_out = workspace->buf;
370 workspace->strm.avail_out = workspace->buf_size;
371 workspace->strm.total_out = 0;
379 workspace->strm.next_in += 2;
380 workspace->strm.avail_in -= 2;
383 if (Z_OK != zlib_inflateInit2(&workspace->strm, wbits)) {
392 ret = zlib_inflate(&workspace->strm, Z_FINISH);
393 to_copy = min(workspace->strm.total_out, destlen);
408 zlib_inflateEnd(&workspace->strm);