Lines Matching refs:bzs
35 bz_stream bzs; member
42 bz_stream bzs; member
150 c->bzs.next_in = data; in compress()
151 c->bzs.avail_in = 0; in compress()
152 c->bzs.next_out = PyBytes_AS_STRING(result); in compress()
153 c->bzs.avail_out = INITIAL_BUFFER_SIZE; in compress()
160 if (c->bzs.avail_in == 0 && len > 0) { in compress()
161 c->bzs.avail_in = (unsigned int)Py_MIN(len, UINT_MAX); in compress()
162 len -= c->bzs.avail_in; in compress()
166 if (action == BZ_RUN && c->bzs.avail_in == 0) in compress()
169 if (c->bzs.avail_out == 0) { in compress()
174 c->bzs.next_out = PyBytes_AS_STRING(result) + data_size; in compress()
177 c->bzs.avail_out = (unsigned int)Py_MIN(buffer_left, UINT_MAX); in compress()
181 this_out = c->bzs.next_out; in compress()
182 bzerror = BZ2_bzCompress(&c->bzs, action); in compress()
183 data_size += c->bzs.next_out - this_out; in compress()
323 self->bzs.opaque = NULL; in _bz2_BZ2Compressor___init___impl()
324 self->bzs.bzalloc = BZ2_Malloc; in _bz2_BZ2Compressor___init___impl()
325 self->bzs.bzfree = BZ2_Free; in _bz2_BZ2Compressor___init___impl()
326 bzerror = BZ2_bzCompressInit(&self->bzs, compresslevel, 0, 0); in _bz2_BZ2Compressor___init___impl()
341 BZ2_bzCompressEnd(&self->bzs); in BZ2Compressor_dealloc()
411 bz_stream *bzs = &d->bzs; in decompress_buf() local
420 bzs->next_out = PyBytes_AS_STRING(result); in decompress_buf()
430 bzs->avail_out = (unsigned int)Py_MIN(avail, UINT_MAX); in decompress_buf()
431 bzs->avail_in = (unsigned int)Py_MIN(d->bzs_avail_in_real, UINT_MAX); in decompress_buf()
432 d->bzs_avail_in_real -= bzs->avail_in; in decompress_buf()
435 bzret = BZ2_bzDecompress(bzs); in decompress_buf()
436 data_size = bzs->next_out - PyBytes_AS_STRING(result); in decompress_buf()
437 d->bzs_avail_in_real += bzs->avail_in; in decompress_buf()
446 } else if (bzs->avail_out == 0) { in decompress_buf()
452 bzs->next_out = PyBytes_AS_STRING(result) + data_size; in decompress_buf()
472 bz_stream *bzs = &d->bzs; in decompress() local
475 if (bzs->next_in != NULL) { in decompress()
480 - (bzs->next_in + d->bzs_avail_in_real); in decompress()
488 size_t offset = bzs->next_in - d->input_buffer; in decompress()
502 bzs->next_in = d->input_buffer + offset; in decompress()
505 memmove(d->input_buffer, bzs->next_in, in decompress()
507 bzs->next_in = d->input_buffer; in decompress()
509 memcpy((void*)(bzs->next_in + d->bzs_avail_in_real), data, len); in decompress()
514 bzs->next_in = data; in decompress()
521 bzs->next_in = NULL; in decompress()
529 PyBytes_FromStringAndSize(bzs->next_in, d->bzs_avail_in_real)); in decompress()
535 bzs->next_in = NULL; in decompress()
565 memcpy(d->input_buffer, bzs->next_in, d->bzs_avail_in_real); in decompress()
566 bzs->next_in = d->input_buffer; in decompress()
655 bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0); in _bz2_BZ2Decompressor___init___impl()
673 BZ2_bzDecompressEnd(&self->bzs); in BZ2Decompressor_dealloc()