Lines Matching refs:def_strm
34 static z_stream inf_strm, def_strm;
43 def_strm.workspace = vmalloc(zlib_deflate_workspacesize());
44 if (!def_strm.workspace) {
52 vfree(def_strm.workspace);
61 vfree(def_strm.workspace);
81 if (Z_OK != zlib_deflateInit(&def_strm, 3)) {
87 def_strm.next_in = data_in;
88 def_strm.total_in = 0;
90 def_strm.next_out = cpage_out;
91 def_strm.total_out = 0;
93 while (def_strm.total_out < *dstlen - STREAM_END_SPACE && def_strm.total_in < *sourcelen) {
94 def_strm.avail_out = *dstlen - (def_strm.total_out + STREAM_END_SPACE);
95 def_strm.avail_in = min((unsigned)(*sourcelen-def_strm.total_in), def_strm.avail_out);
97 def_strm.avail_in, def_strm.avail_out));
98 ret = zlib_deflate(&def_strm, Z_PARTIAL_FLUSH);
100 def_strm.avail_in, def_strm.avail_out, def_strm.total_in, def_strm.total_out));
103 zlib_deflateEnd(&def_strm);
108 def_strm.avail_out += STREAM_END_SPACE;
109 def_strm.avail_in = 0;
110 ret = zlib_deflate(&def_strm, Z_FINISH);
111 zlib_deflateEnd(&def_strm);
119 if (def_strm.total_out >= def_strm.total_in) {
121 def_strm.total_in, def_strm.total_out));
127 def_strm.total_in, def_strm.total_out));
129 *dstlen = def_strm.total_out;
130 *sourcelen = def_strm.total_in;