Lines Matching refs:bzs

33     bz_stream bzs;  member
40 bz_stream bzs; member
148 c->bzs.next_in = data; in compress()
149 c->bzs.avail_in = 0; in compress()
150 c->bzs.next_out = PyBytes_AS_STRING(result); in compress()
151 c->bzs.avail_out = INITIAL_BUFFER_SIZE; in compress()
158 if (c->bzs.avail_in == 0 && len > 0) { in compress()
159 c->bzs.avail_in = (unsigned int)Py_MIN(len, UINT_MAX); in compress()
160 len -= c->bzs.avail_in; in compress()
164 if (action == BZ_RUN && c->bzs.avail_in == 0) in compress()
167 if (c->bzs.avail_out == 0) { in compress()
172 c->bzs.next_out = PyBytes_AS_STRING(result) + data_size; in compress()
175 c->bzs.avail_out = (unsigned int)Py_MIN(buffer_left, UINT_MAX); in compress()
179 this_out = c->bzs.next_out; in compress()
180 bzerror = BZ2_bzCompress(&c->bzs, action); in compress()
181 data_size += c->bzs.next_out - this_out; in compress()
313 self->bzs.opaque = NULL; in _bz2_BZ2Compressor___init___impl()
314 self->bzs.bzalloc = BZ2_Malloc; in _bz2_BZ2Compressor___init___impl()
315 self->bzs.bzfree = BZ2_Free; in _bz2_BZ2Compressor___init___impl()
316 bzerror = BZ2_bzCompressInit(&self->bzs, compresslevel, 0, 0); in _bz2_BZ2Compressor___init___impl()
331 BZ2_bzCompressEnd(&self->bzs); in BZ2Compressor_dealloc()
400 bz_stream *bzs = &d->bzs; in decompress_buf() local
409 bzs->next_out = PyBytes_AS_STRING(result); in decompress_buf()
419 bzs->avail_out = (unsigned int)Py_MIN(avail, UINT_MAX); in decompress_buf()
420 bzs->avail_in = (unsigned int)Py_MIN(d->bzs_avail_in_real, UINT_MAX); in decompress_buf()
421 d->bzs_avail_in_real -= bzs->avail_in; in decompress_buf()
424 bzret = BZ2_bzDecompress(bzs); in decompress_buf()
425 data_size = bzs->next_out - PyBytes_AS_STRING(result); in decompress_buf()
426 d->bzs_avail_in_real += bzs->avail_in; in decompress_buf()
435 } else if (bzs->avail_out == 0) { in decompress_buf()
441 bzs->next_out = PyBytes_AS_STRING(result) + data_size; in decompress_buf()
461 bz_stream *bzs = &d->bzs; in decompress() local
464 if (bzs->next_in != NULL) { in decompress()
469 - (bzs->next_in + d->bzs_avail_in_real); in decompress()
477 size_t offset = bzs->next_in - d->input_buffer; in decompress()
491 bzs->next_in = d->input_buffer + offset; in decompress()
494 memmove(d->input_buffer, bzs->next_in, in decompress()
496 bzs->next_in = d->input_buffer; in decompress()
498 memcpy((void*)(bzs->next_in + d->bzs_avail_in_real), data, len); in decompress()
503 bzs->next_in = data; in decompress()
510 bzs->next_in = NULL; in decompress()
518 PyBytes_FromStringAndSize(bzs->next_in, d->bzs_avail_in_real)); in decompress()
524 bzs->next_in = NULL; in decompress()
554 memcpy(d->input_buffer, bzs->next_in, d->bzs_avail_in_real); in decompress()
555 bzs->next_in = d->input_buffer; in decompress()
636 bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0); in _bz2_BZ2Decompressor___init___impl()
654 BZ2_bzDecompressEnd(&self->bzs); in BZ2Decompressor_dealloc()