Lines Matching refs:bzs
42 bz_stream bzs; member
51 bz_stream bzs; member
161 c->bzs.next_in = data; in compress()
162 c->bzs.avail_in = 0; in compress()
163 c->bzs.next_out = PyBytes_AS_STRING(result); in compress()
164 c->bzs.avail_out = INITIAL_BUFFER_SIZE; in compress()
171 if (c->bzs.avail_in == 0 && len > 0) { in compress()
172 c->bzs.avail_in = (unsigned int)Py_MIN(len, UINT_MAX); in compress()
173 len -= c->bzs.avail_in; in compress()
177 if (action == BZ_RUN && c->bzs.avail_in == 0) in compress()
180 if (c->bzs.avail_out == 0) { in compress()
185 c->bzs.next_out = PyBytes_AS_STRING(result) + data_size; in compress()
188 c->bzs.avail_out = (unsigned int)Py_MIN(buffer_left, UINT_MAX); in compress()
192 this_out = c->bzs.next_out; in compress()
193 bzerror = BZ2_bzCompress(&c->bzs, action); in compress()
194 data_size += c->bzs.next_out - this_out; in compress()
336 self->bzs.opaque = NULL; in _bz2_BZ2Compressor___init___impl()
337 self->bzs.bzalloc = BZ2_Malloc; in _bz2_BZ2Compressor___init___impl()
338 self->bzs.bzfree = BZ2_Free; in _bz2_BZ2Compressor___init___impl()
339 bzerror = BZ2_bzCompressInit(&self->bzs, compresslevel, 0, 0); in _bz2_BZ2Compressor___init___impl()
356 BZ2_bzCompressEnd(&self->bzs); in BZ2Compressor_dealloc()
428 bz_stream *bzs = &d->bzs; in decompress_buf() local
437 bzs->next_out = PyBytes_AS_STRING(result); in decompress_buf()
447 bzs->avail_out = (unsigned int)Py_MIN(avail, UINT_MAX); in decompress_buf()
448 bzs->avail_in = (unsigned int)Py_MIN(d->bzs_avail_in_real, UINT_MAX); in decompress_buf()
449 d->bzs_avail_in_real -= bzs->avail_in; in decompress_buf()
452 bzret = BZ2_bzDecompress(bzs); in decompress_buf()
453 data_size = bzs->next_out - PyBytes_AS_STRING(result); in decompress_buf()
454 d->bzs_avail_in_real += bzs->avail_in; in decompress_buf()
463 } else if (bzs->avail_out == 0) { in decompress_buf()
469 bzs->next_out = PyBytes_AS_STRING(result) + data_size; in decompress_buf()
489 bz_stream *bzs = &d->bzs; in decompress() local
492 if (bzs->next_in != NULL) { in decompress()
497 - (bzs->next_in + d->bzs_avail_in_real); in decompress()
505 size_t offset = bzs->next_in - d->input_buffer; in decompress()
519 bzs->next_in = d->input_buffer + offset; in decompress()
522 memmove(d->input_buffer, bzs->next_in, in decompress()
524 bzs->next_in = d->input_buffer; in decompress()
526 memcpy((void*)(bzs->next_in + d->bzs_avail_in_real), data, len); in decompress()
531 bzs->next_in = data; in decompress()
538 bzs->next_in = NULL; in decompress()
546 PyBytes_FromStringAndSize(bzs->next_in, d->bzs_avail_in_real)); in decompress()
552 bzs->next_in = NULL; in decompress()
582 memcpy(d->input_buffer, bzs->next_in, d->bzs_avail_in_real); in decompress()
583 bzs->next_in = d->input_buffer; in decompress()
670 bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0); in _bz2_BZ2Decompressor___init___impl()
690 BZ2_bzDecompressEnd(&self->bzs); in BZ2Decompressor_dealloc()