Lines Matching refs:bzs
112 bz_stream bzs; member
121 bz_stream bzs; member
1617 bz_stream *bzs = &self->bzs; in BZ2Comp_compress() local
1639 bzs->next_in = pdata.buf; in BZ2Comp_compress()
1640 bzs->avail_in = MIN(pdata.len, UINT_MAX); in BZ2Comp_compress()
1641 input_left = pdata.len - bzs->avail_in; in BZ2Comp_compress()
1643 bzs->next_out = BUF(ret); in BZ2Comp_compress()
1644 bzs->avail_out = PyString_GET_SIZE(ret); in BZ2Comp_compress()
1650 saved_next_out = bzs->next_out; in BZ2Comp_compress()
1651 bzerror = BZ2_bzCompress(bzs, BZ_RUN); in BZ2Comp_compress()
1652 output_size += bzs->next_out - saved_next_out; in BZ2Comp_compress()
1659 if (bzs->avail_in == 0) { in BZ2Comp_compress()
1662 bzs->avail_in = MIN(input_left, UINT_MAX); in BZ2Comp_compress()
1663 input_left -= bzs->avail_in; in BZ2Comp_compress()
1665 if (bzs->avail_out == 0) { in BZ2Comp_compress()
1669 BZ2_bzCompressEnd(bzs); in BZ2Comp_compress()
1672 bzs->next_out = BUF(ret) + output_size; in BZ2Comp_compress()
1675 bzs->avail_out = MIN(buffer_left, UINT_MAX); in BZ2Comp_compress()
1705 bz_stream *bzs = &self->bzs; in BZ2Comp_flush() local
1719 bzs->next_out = BUF(ret); in BZ2Comp_flush()
1720 bzs->avail_out = PyString_GET_SIZE(ret); in BZ2Comp_flush()
1726 saved_next_out = bzs->next_out; in BZ2Comp_flush()
1727 bzerror = BZ2_bzCompress(bzs, BZ_FINISH); in BZ2Comp_flush()
1728 output_size += bzs->next_out - saved_next_out; in BZ2Comp_flush()
1737 if (bzs->avail_out == 0) { in BZ2Comp_flush()
1742 bzs->next_out = BUF(ret) + output_size; in BZ2Comp_flush()
1745 bzs->avail_out = MIN(buffer_left, UINT_MAX); in BZ2Comp_flush()
1799 memset(&self->bzs, 0, sizeof(bz_stream)); in BZ2Comp_init()
1800 bzerror = BZ2_bzCompressInit(&self->bzs, compresslevel, 0, 0); in BZ2Comp_init()
1826 BZ2_bzCompressEnd(&self->bzs); in BZ2Comp_dealloc()
1919 bz_stream *bzs = &self->bzs; in BZ2Decomp_decompress() local
1936 bzs->next_in = pdata.buf; in BZ2Decomp_decompress()
1937 bzs->avail_in = MIN(pdata.len, UINT_MAX); in BZ2Decomp_decompress()
1938 input_left = pdata.len - bzs->avail_in; in BZ2Decomp_decompress()
1940 bzs->next_out = BUF(ret); in BZ2Decomp_decompress()
1941 bzs->avail_out = PyString_GET_SIZE(ret); in BZ2Decomp_decompress()
1947 saved_next_out = bzs->next_out; in BZ2Decomp_decompress()
1948 bzerror = BZ2_bzDecompress(bzs); in BZ2Decomp_decompress()
1949 output_size += bzs->next_out - saved_next_out; in BZ2Decomp_decompress()
1954 input_left += bzs->avail_in; in BZ2Decomp_decompress()
1957 PyString_FromStringAndSize(bzs->next_in, input_left)); in BZ2Decomp_decompress()
1967 if (bzs->avail_in == 0) { in BZ2Decomp_decompress()
1970 bzs->avail_in = MIN(input_left, UINT_MAX); in BZ2Decomp_decompress()
1971 input_left -= bzs->avail_in; in BZ2Decomp_decompress()
1973 if (bzs->avail_out == 0) { in BZ2Decomp_decompress()
1977 BZ2_bzDecompressEnd(bzs); in BZ2Decomp_decompress()
1980 bzs->next_out = BUF(ret) + output_size; in BZ2Decomp_decompress()
1983 bzs->avail_out = MIN(buffer_left, UINT_MAX); in BZ2Decomp_decompress()
2031 memset(&self->bzs, 0, sizeof(bz_stream)); in BZ2Decomp_init()
2032 bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0); in BZ2Decomp_init()
2061 BZ2_bzDecompressEnd(&self->bzs); in BZ2Decomp_dealloc()
2142 bz_stream *bzs = &_bzs; in bz2_compress() local
2164 memset(bzs, 0, sizeof(bz_stream)); in bz2_compress()
2166 bzs->next_in = pdata.buf; in bz2_compress()
2167 bzs->avail_in = MIN(pdata.len, UINT_MAX); in bz2_compress()
2168 input_left = pdata.len - bzs->avail_in; in bz2_compress()
2170 bzs->next_out = BUF(ret); in bz2_compress()
2171 bzs->avail_out = PyString_GET_SIZE(ret); in bz2_compress()
2173 bzerror = BZ2_bzCompressInit(bzs, compresslevel, 0, 0); in bz2_compress()
2187 saved_next_out = bzs->next_out; in bz2_compress()
2188 bzerror = BZ2_bzCompress(bzs, action); in bz2_compress()
2189 output_size += bzs->next_out - saved_next_out; in bz2_compress()
2195 BZ2_bzCompressEnd(bzs); in bz2_compress()
2201 if (action == BZ_RUN && bzs->avail_in == 0) { in bz2_compress()
2205 bzs->avail_in = MIN(input_left, UINT_MAX); in bz2_compress()
2206 input_left -= bzs->avail_in; in bz2_compress()
2209 if (bzs->avail_out == 0) { in bz2_compress()
2213 BZ2_bzCompressEnd(bzs); in bz2_compress()
2217 bzs->next_out = BUF(ret) + output_size; in bz2_compress()
2220 bzs->avail_out = MIN(buffer_left, UINT_MAX); in bz2_compress()
2227 BZ2_bzCompressEnd(bzs); in bz2_compress()
2247 bz_stream *bzs = &_bzs; in bz2_decompress() local
2264 memset(bzs, 0, sizeof(bz_stream)); in bz2_decompress()
2266 bzs->next_in = pdata.buf; in bz2_decompress()
2267 bzs->avail_in = MIN(pdata.len, UINT_MAX); in bz2_decompress()
2268 input_left = pdata.len - bzs->avail_in; in bz2_decompress()
2270 bzs->next_out = BUF(ret); in bz2_decompress()
2271 bzs->avail_out = PyString_GET_SIZE(ret); in bz2_decompress()
2273 bzerror = BZ2_bzDecompressInit(bzs, 0, 0); in bz2_decompress()
2285 saved_next_out = bzs->next_out; in bz2_decompress()
2286 bzerror = BZ2_bzDecompress(bzs); in bz2_decompress()
2287 output_size += bzs->next_out - saved_next_out; in bz2_decompress()
2293 BZ2_bzDecompressEnd(bzs); in bz2_decompress()
2299 if (bzs->avail_in == 0) { in bz2_decompress()
2301 BZ2_bzDecompressEnd(bzs); in bz2_decompress()
2308 bzs->avail_in = MIN(input_left, UINT_MAX); in bz2_decompress()
2309 input_left -= bzs->avail_in; in bz2_decompress()
2311 if (bzs->avail_out == 0) { in bz2_decompress()
2315 BZ2_bzDecompressEnd(bzs); in bz2_decompress()
2319 bzs->next_out = BUF(ret) + output_size; in bz2_decompress()
2322 bzs->avail_out = MIN(buffer_left, UINT_MAX); in bz2_decompress()
2329 BZ2_bzDecompressEnd(bzs); in bz2_decompress()