Lines Matching refs:def_strm
36 static z_stream inf_strm, def_strm;
45 def_strm.workspace = vmalloc(zlib_deflate_workspacesize(MAX_WBITS,
47 if (!def_strm.workspace)
54 vfree(def_strm.workspace);
64 vfree(def_strm.workspace);
83 if (Z_OK != zlib_deflateInit(&def_strm, 3)) {
89 def_strm.next_in = data_in;
90 def_strm.total_in = 0;
92 def_strm.next_out = cpage_out;
93 def_strm.total_out = 0;
95 while (def_strm.total_out < *dstlen - STREAM_END_SPACE && def_strm.total_in < *sourcelen) {
96 def_strm.avail_out = *dstlen - (def_strm.total_out + STREAM_END_SPACE);
97 def_strm.avail_in = min_t(unsigned long,
98 (*sourcelen-def_strm.total_in), def_strm.avail_out);
100 def_strm.avail_in, def_strm.avail_out);
101 ret = zlib_deflate(&def_strm, Z_PARTIAL_FLUSH);
103 def_strm.avail_in, def_strm.avail_out,
104 def_strm.total_in, def_strm.total_out);
107 zlib_deflateEnd(&def_strm);
112 def_strm.avail_out += STREAM_END_SPACE;
113 def_strm.avail_in = 0;
114 ret = zlib_deflate(&def_strm, Z_FINISH);
115 zlib_deflateEnd(&def_strm);
123 if (def_strm.total_out >= def_strm.total_in) {
125 def_strm.total_in, def_strm.total_out);
131 def_strm.total_in, def_strm.total_out);
133 *dstlen = def_strm.total_out;
134 *sourcelen = def_strm.total_in;