Lines Matching refs:strm
239 bz_stream* strm,
246 bz_stream* strm,
251 bz_stream* strm
255 bz_stream *strm,
261 bz_stream* strm
265 bz_stream *strm
491 #define BZALLOC(nnn) (strm->bzalloc)(strm->opaque,(nnn),1)
492 #define BZFREE(ppp) (strm->bzfree)(strm->opaque,(ppp))
588 bz_stream* strm;
739 bz_stream* strm;
1413 if (s->strm->avail_in == 0) RETURN(BZ_OK); \
1417 (*((UChar*)(s->strm->next_in)))); \
1419 s->strm->next_in++; \
1420 s->strm->avail_in--; \
1421 s->strm->total_in_lo32++; \
1422 if (s->strm->total_in_lo32 == 0) \
1423 s->strm->total_in_hi32++; \
1485 bz_stream* strm = s->strm;
4524 ( bz_stream* strm,
4534 if (strm == NULL ||
4540 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
4541 if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
4545 s->strm = strm;
4578 strm->state = s;
4579 strm->total_in_lo32 = 0;
4580 strm->total_in_hi32 = 0;
4581 strm->total_out_lo32 = 0;
4582 strm->total_out_hi32 = 0;
4675 if (s->strm->avail_in == 0) break;
4677 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) );
4678 s->strm->next_in++;
4679 s->strm->avail_in--;
4680 s->strm->total_in_lo32++;
4681 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++;
4691 if (s->strm->avail_in == 0) break;
4695 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) );
4696 s->strm->next_in++;
4697 s->strm->avail_in--;
4698 s->strm->total_in_lo32++;
4699 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++;
4716 if (s->strm->avail_out == 0) break;
4722 *(s->strm->next_out) = s->zbits[s->state_out_pos];
4724 s->strm->avail_out--;
4725 s->strm->next_out++;
4726 s->strm->total_out_lo32++;
4727 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
4736 Bool handle_compress ( bz_stream* strm )
4740 EState* s = strm->state;
4770 if (s->strm->avail_in == 0) {
4782 int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action )
4786 if (strm == NULL) return BZ_PARAM_ERROR;
4787 s = strm->state;
4789 if (s->strm != strm) return BZ_PARAM_ERROR;
4799 progress = handle_compress ( strm );
4804 s->avail_in_expect = strm->avail_in;
4810 s->avail_in_expect = strm->avail_in;
4819 if (s->avail_in_expect != s->strm->avail_in)
4821 progress = handle_compress ( strm );
4829 if (s->avail_in_expect != s->strm->avail_in)
4831 progress = handle_compress ( strm );
4843 int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm )
4846 if (strm == NULL) return BZ_PARAM_ERROR;
4847 s = strm->state;
4849 if (s->strm != strm) return BZ_PARAM_ERROR;
4854 BZFREE(strm->state);
4856 strm->state = NULL;
4868 ( bz_stream* strm,
4876 if (strm == NULL) return BZ_PARAM_ERROR;
4880 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
4881 if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
4885 s->strm = strm;
4886 strm->state = s;
4891 strm->total_in_lo32 = 0;
4892 strm->total_in_hi32 = 0;
4893 strm->total_out_lo32 = 0;
4894 strm->total_out_hi32 = 0;
4920 if (s->strm->avail_out == 0) return False;
4922 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
4925 s->strm->next_out++;
4926 s->strm->avail_out--;
4927 s->strm->total_out_lo32++;
4928 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
4974 char* cs_next_out = s->strm->next_out;
4975 unsigned int cs_avail_out = s->strm->avail_out;
5038 total_out_lo32_old = s->strm->total_out_lo32;
5039 s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out);
5040 if (s->strm->total_out_lo32 < total_out_lo32_old)
5041 s->strm->total_out_hi32++;
5051 s->strm->next_out = cs_next_out;
5052 s->strm->avail_out = cs_avail_out;
5074 if (s->strm->avail_out == 0) return False;
5076 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
5079 s->strm->next_out++;
5080 s->strm->avail_out--;
5081 s->strm->total_out_lo32++;
5082 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
5123 if (s->strm->avail_out == 0) return False;
5125 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
5128 s->strm->next_out++;
5129 s->strm->avail_out--;
5130 s->strm->total_out_lo32++;
5131 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
5167 int BZ_API(BZ2_bzDecompress) ( bz_stream *strm )
5171 if (strm == NULL) return BZ_PARAM_ERROR;
5172 s = strm->state;
5174 if (s->strm != strm) return BZ_PARAM_ERROR;
5221 int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm )
5224 if (strm == NULL) return BZ_PARAM_ERROR;
5225 s = strm->state;
5227 if (s->strm != strm) return BZ_PARAM_ERROR;
5233 BZFREE(strm->state);
5234 strm->state = NULL;
5257 bz_stream strm;
5305 bzf->strm.bzalloc = NULL;
5306 bzf->strm.bzfree = NULL;
5307 bzf->strm.opaque = NULL;
5310 ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k,
5315 bzf->strm.avail_in = 0;
5343 bzf->strm.avail_in = len;
5344 bzf->strm.next_in = buf;
5347 bzf->strm.avail_out = BZ_MAX_UNUSED;
5348 bzf->strm.next_out = bzf->buf;
5349 ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN );
5353 if (bzf->strm.avail_out < BZ_MAX_UNUSED) {
5354 n = BZ_MAX_UNUSED - bzf->strm.avail_out;
5361 if (bzf->strm.avail_in == 0)
5406 bzf->strm.avail_out = BZ_MAX_UNUSED;
5407 bzf->strm.next_out = bzf->buf;
5408 ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH );
5412 if (bzf->strm.avail_out < BZ_MAX_UNUSED) {
5413 n = BZ_MAX_UNUSED - bzf->strm.avail_out;
5431 *nbytes_in_lo32 = bzf->strm.total_in_lo32;
5433 *nbytes_in_hi32 = bzf->strm.total_in_hi32;
5435 *nbytes_out_lo32 = bzf->strm.total_out_lo32;
5437 *nbytes_out_hi32 = bzf->strm.total_out_hi32;
5440 BZ2_bzCompressEnd ( &(bzf->strm) );
5479 bzf->strm.bzalloc = NULL;
5480 bzf->strm.bzfree = NULL;
5481 bzf->strm.opaque = NULL;
5489 ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small );
5493 bzf->strm.avail_in = bzf->bufN;
5494 bzf->strm.next_in = bzf->buf;
5514 (void)BZ2_bzDecompressEnd ( &(bzf->strm) );
5540 bzf->strm.avail_out = len;
5541 bzf->strm.next_out = buf;
5548 if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) {
5554 bzf->strm.avail_in = bzf->bufN;
5555 bzf->strm.next_in = bzf->buf;
5558 ret = BZ2_bzDecompress ( &(bzf->strm) );
5564 bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0)
5569 return len - bzf->strm.avail_out; };
5570 if (bzf->strm.avail_out == 0)
5595 *nUnused = bzf->strm.avail_in;
5596 *unused = bzf->strm.next_in;
5615 bz_stream strm;
5626 strm.bzalloc = NULL;
5627 strm.bzfree = NULL;
5628 strm.opaque = NULL;
5629 ret = BZ2_bzCompressInit ( &strm, blockSize100k,
5633 strm.next_in = source;
5634 strm.next_out = dest;
5635 strm.avail_in = sourceLen;
5636 strm.avail_out = *destLen;
5638 ret = BZ2_bzCompress ( &strm, BZ_FINISH );
5643 *destLen -= strm.avail_out;
5644 BZ2_bzCompressEnd ( &strm );
5648 BZ2_bzCompressEnd ( &strm );
5652 BZ2_bzCompressEnd ( &strm );
5666 bz_stream strm;
5675 strm.bzalloc = NULL;
5676 strm.bzfree = NULL;
5677 strm.opaque = NULL;
5678 ret = BZ2_bzDecompressInit ( &strm, verbosity, small );
5681 strm.next_in = source;
5682 strm.next_out = dest;
5683 strm.avail_in = sourceLen;
5684 strm.avail_out = *destLen;
5686 ret = BZ2_bzDecompress ( &strm );
5691 *destLen -= strm.avail_out;
5692 BZ2_bzDecompressEnd ( &strm );
5696 if (strm.avail_out > 0) {
5697 BZ2_bzDecompressEnd ( &strm );
5700 BZ2_bzDecompressEnd ( &strm );
5705 BZ2_bzDecompressEnd ( &strm );