Lines Matching refs:bzs

112     bz_stream bzs;  member
121 bz_stream bzs; member
1631 bz_stream *bzs = &self->bzs; in BZ2Comp_compress() local
1653 bzs->next_in = pdata.buf; in BZ2Comp_compress()
1654 bzs->avail_in = MIN(pdata.len, UINT_MAX); in BZ2Comp_compress()
1655 input_left = pdata.len - bzs->avail_in; in BZ2Comp_compress()
1657 bzs->next_out = BUF(ret); in BZ2Comp_compress()
1658 bzs->avail_out = PyString_GET_SIZE(ret); in BZ2Comp_compress()
1664 saved_next_out = bzs->next_out; in BZ2Comp_compress()
1665 bzerror = BZ2_bzCompress(bzs, BZ_RUN); in BZ2Comp_compress()
1666 output_size += bzs->next_out - saved_next_out; in BZ2Comp_compress()
1673 if (bzs->avail_in == 0) { in BZ2Comp_compress()
1676 bzs->avail_in = MIN(input_left, UINT_MAX); in BZ2Comp_compress()
1677 input_left -= bzs->avail_in; in BZ2Comp_compress()
1679 if (bzs->avail_out == 0) { in BZ2Comp_compress()
1683 BZ2_bzCompressEnd(bzs); in BZ2Comp_compress()
1686 bzs->next_out = BUF(ret) + output_size; in BZ2Comp_compress()
1689 bzs->avail_out = MIN(buffer_left, UINT_MAX); in BZ2Comp_compress()
1719 bz_stream *bzs = &self->bzs; in BZ2Comp_flush() local
1733 bzs->next_out = BUF(ret); in BZ2Comp_flush()
1734 bzs->avail_out = PyString_GET_SIZE(ret); in BZ2Comp_flush()
1740 saved_next_out = bzs->next_out; in BZ2Comp_flush()
1741 bzerror = BZ2_bzCompress(bzs, BZ_FINISH); in BZ2Comp_flush()
1742 output_size += bzs->next_out - saved_next_out; in BZ2Comp_flush()
1751 if (bzs->avail_out == 0) { in BZ2Comp_flush()
1756 bzs->next_out = BUF(ret) + output_size; in BZ2Comp_flush()
1759 bzs->avail_out = MIN(buffer_left, UINT_MAX); in BZ2Comp_flush()
1813 memset(&self->bzs, 0, sizeof(bz_stream)); in BZ2Comp_init()
1814 bzerror = BZ2_bzCompressInit(&self->bzs, compresslevel, 0, 0); in BZ2Comp_init()
1840 BZ2_bzCompressEnd(&self->bzs); in BZ2Comp_dealloc()
1933 bz_stream *bzs = &self->bzs; in BZ2Decomp_decompress() local
1950 bzs->next_in = pdata.buf; in BZ2Decomp_decompress()
1951 bzs->avail_in = MIN(pdata.len, UINT_MAX); in BZ2Decomp_decompress()
1952 input_left = pdata.len - bzs->avail_in; in BZ2Decomp_decompress()
1954 bzs->next_out = BUF(ret); in BZ2Decomp_decompress()
1955 bzs->avail_out = PyString_GET_SIZE(ret); in BZ2Decomp_decompress()
1961 saved_next_out = bzs->next_out; in BZ2Decomp_decompress()
1962 bzerror = BZ2_bzDecompress(bzs); in BZ2Decomp_decompress()
1963 output_size += bzs->next_out - saved_next_out; in BZ2Decomp_decompress()
1968 input_left += bzs->avail_in; in BZ2Decomp_decompress()
1971 PyString_FromStringAndSize(bzs->next_in, input_left)); in BZ2Decomp_decompress()
1981 if (bzs->avail_in == 0) { in BZ2Decomp_decompress()
1984 bzs->avail_in = MIN(input_left, UINT_MAX); in BZ2Decomp_decompress()
1985 input_left -= bzs->avail_in; in BZ2Decomp_decompress()
1987 if (bzs->avail_out == 0) { in BZ2Decomp_decompress()
1991 BZ2_bzDecompressEnd(bzs); in BZ2Decomp_decompress()
1994 bzs->next_out = BUF(ret) + output_size; in BZ2Decomp_decompress()
1997 bzs->avail_out = MIN(buffer_left, UINT_MAX); in BZ2Decomp_decompress()
2045 memset(&self->bzs, 0, sizeof(bz_stream)); in BZ2Decomp_init()
2046 bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0); in BZ2Decomp_init()
2075 BZ2_bzDecompressEnd(&self->bzs); in BZ2Decomp_dealloc()
2156 bz_stream *bzs = &_bzs; in bz2_compress() local
2178 memset(bzs, 0, sizeof(bz_stream)); in bz2_compress()
2180 bzs->next_in = pdata.buf; in bz2_compress()
2181 bzs->avail_in = MIN(pdata.len, UINT_MAX); in bz2_compress()
2182 input_left = pdata.len - bzs->avail_in; in bz2_compress()
2184 bzs->next_out = BUF(ret); in bz2_compress()
2185 bzs->avail_out = PyString_GET_SIZE(ret); in bz2_compress()
2187 bzerror = BZ2_bzCompressInit(bzs, compresslevel, 0, 0); in bz2_compress()
2201 saved_next_out = bzs->next_out; in bz2_compress()
2202 bzerror = BZ2_bzCompress(bzs, action); in bz2_compress()
2203 output_size += bzs->next_out - saved_next_out; in bz2_compress()
2209 BZ2_bzCompressEnd(bzs); in bz2_compress()
2215 if (action == BZ_RUN && bzs->avail_in == 0) { in bz2_compress()
2219 bzs->avail_in = MIN(input_left, UINT_MAX); in bz2_compress()
2220 input_left -= bzs->avail_in; in bz2_compress()
2223 if (bzs->avail_out == 0) { in bz2_compress()
2227 BZ2_bzCompressEnd(bzs); in bz2_compress()
2231 bzs->next_out = BUF(ret) + output_size; in bz2_compress()
2234 bzs->avail_out = MIN(buffer_left, UINT_MAX); in bz2_compress()
2241 BZ2_bzCompressEnd(bzs); in bz2_compress()
2261 bz_stream *bzs = &_bzs; in bz2_decompress() local
2278 memset(bzs, 0, sizeof(bz_stream)); in bz2_decompress()
2280 bzs->next_in = pdata.buf; in bz2_decompress()
2281 bzs->avail_in = MIN(pdata.len, UINT_MAX); in bz2_decompress()
2282 input_left = pdata.len - bzs->avail_in; in bz2_decompress()
2284 bzs->next_out = BUF(ret); in bz2_decompress()
2285 bzs->avail_out = PyString_GET_SIZE(ret); in bz2_decompress()
2287 bzerror = BZ2_bzDecompressInit(bzs, 0, 0); in bz2_decompress()
2299 saved_next_out = bzs->next_out; in bz2_decompress()
2300 bzerror = BZ2_bzDecompress(bzs); in bz2_decompress()
2301 output_size += bzs->next_out - saved_next_out; in bz2_decompress()
2307 BZ2_bzDecompressEnd(bzs); in bz2_decompress()
2313 if (bzs->avail_in == 0) { in bz2_decompress()
2315 BZ2_bzDecompressEnd(bzs); in bz2_decompress()
2322 bzs->avail_in = MIN(input_left, UINT_MAX); in bz2_decompress()
2323 input_left -= bzs->avail_in; in bz2_decompress()
2325 if (bzs->avail_out == 0) { in bz2_decompress()
2329 BZ2_bzDecompressEnd(bzs); in bz2_decompress()
2333 bzs->next_out = BUF(ret) + output_size; in bz2_decompress()
2336 bzs->avail_out = MIN(buffer_left, UINT_MAX); in bz2_decompress()
2343 BZ2_bzDecompressEnd(bzs); in bz2_decompress()