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