Lines Matching refs:strm

152                     ( bz_stream* strm,   in BZ_API()
162 if (strm == NULL || in BZ_API()
168 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
169 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
173 s->strm = strm; in BZ_API()
206 strm->state = s; in BZ_API()
207 strm->total_in_lo32 = 0; in BZ_API()
208 strm->total_in_hi32 = 0; in BZ_API()
209 strm->total_out_lo32 = 0; in BZ_API()
210 strm->total_out_hi32 = 0; in BZ_API()
303 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
305 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
306 s->strm->next_in++; in copy_input_until_stop()
307 s->strm->avail_in--; in copy_input_until_stop()
308 s->strm->total_in_lo32++; in copy_input_until_stop()
309 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
319 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
323 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
324 s->strm->next_in++; in copy_input_until_stop()
325 s->strm->avail_in--; in copy_input_until_stop()
326 s->strm->total_in_lo32++; in copy_input_until_stop()
327 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
344 if (s->strm->avail_out == 0) break; in copy_output_until_stop()
350 *(s->strm->next_out) = s->zbits[s->state_out_pos]; in copy_output_until_stop()
352 s->strm->avail_out--; in copy_output_until_stop()
353 s->strm->next_out++; in copy_output_until_stop()
354 s->strm->total_out_lo32++; in copy_output_until_stop()
355 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in copy_output_until_stop()
364 Bool handle_compress ( bz_stream* strm ) in handle_compress() argument
368 EState* s = strm->state; in handle_compress()
398 if (s->strm->avail_in == 0) { in handle_compress()
410 int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action ) in BZ_API()
414 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
415 s = strm->state; in BZ_API()
417 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
427 progress = handle_compress ( strm ); in BZ_API()
432 s->avail_in_expect = strm->avail_in; in BZ_API()
438 s->avail_in_expect = strm->avail_in; in BZ_API()
447 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
449 progress = handle_compress ( strm ); in BZ_API()
457 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
459 progress = handle_compress ( strm ); in BZ_API()
471 int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm ) in BZ_API()
474 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
475 s = strm->state; in BZ_API()
477 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
482 BZFREE(strm->state); in BZ_API()
484 strm->state = NULL; in BZ_API()
497 ( bz_stream* strm, in BZ_API()
505 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
509 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
510 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
514 s->strm = strm; in BZ_API()
515 strm->state = s; in BZ_API()
520 strm->total_in_lo32 = 0; in BZ_API()
521 strm->total_in_hi32 = 0; in BZ_API()
522 strm->total_out_lo32 = 0; in BZ_API()
523 strm->total_out_hi32 = 0; in BZ_API()
549 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_FAST()
551 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_FAST()
554 s->strm->next_out++; in unRLE_obuf_to_output_FAST()
555 s->strm->avail_out--; in unRLE_obuf_to_output_FAST()
556 s->strm->total_out_lo32++; in unRLE_obuf_to_output_FAST()
557 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
603 char* cs_next_out = s->strm->next_out; in unRLE_obuf_to_output_FAST()
604 unsigned int cs_avail_out = s->strm->avail_out; in unRLE_obuf_to_output_FAST()
668 total_out_lo32_old = s->strm->total_out_lo32; in unRLE_obuf_to_output_FAST()
669 s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out); in unRLE_obuf_to_output_FAST()
670 if (s->strm->total_out_lo32 < total_out_lo32_old) in unRLE_obuf_to_output_FAST()
671 s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
681 s->strm->next_out = cs_next_out; in unRLE_obuf_to_output_FAST()
682 s->strm->avail_out = cs_avail_out; in unRLE_obuf_to_output_FAST()
719 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_SMALL()
721 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
724 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
725 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
726 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
727 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
768 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_SMALL()
770 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
773 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
774 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
775 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
776 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
812 int BZ_API(BZ2_bzDecompress) ( bz_stream *strm ) in BZ_API()
816 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
817 s = strm->state; in BZ_API()
819 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
866 int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm ) in BZ_API()
869 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
870 s = strm->state; in BZ_API()
872 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
878 BZFREE(strm->state); in BZ_API()
879 strm->state = NULL; in BZ_API()
903 bz_stream strm; member
951 bzf->strm.bzalloc = NULL; in BZ_API()
952 bzf->strm.bzfree = NULL; in BZ_API()
953 bzf->strm.opaque = NULL; in BZ_API()
956 ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, in BZ_API()
961 bzf->strm.avail_in = 0; in BZ_API()
989 bzf->strm.avail_in = len; in BZ_API()
990 bzf->strm.next_in = buf; in BZ_API()
993 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
994 bzf->strm.next_out = bzf->buf; in BZ_API()
995 ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN ); in BZ_API()
999 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1000 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1007 if (bzf->strm.avail_in == 0) in BZ_API()
1052 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1053 bzf->strm.next_out = bzf->buf; in BZ_API()
1054 ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH ); in BZ_API()
1058 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1059 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1077 *nbytes_in_lo32 = bzf->strm.total_in_lo32; in BZ_API()
1079 *nbytes_in_hi32 = bzf->strm.total_in_hi32; in BZ_API()
1081 *nbytes_out_lo32 = bzf->strm.total_out_lo32; in BZ_API()
1083 *nbytes_out_hi32 = bzf->strm.total_out_hi32; in BZ_API()
1086 BZ2_bzCompressEnd ( &(bzf->strm) ); in BZ_API()
1125 bzf->strm.bzalloc = NULL; in BZ_API()
1126 bzf->strm.bzfree = NULL; in BZ_API()
1127 bzf->strm.opaque = NULL; in BZ_API()
1135 ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small ); in BZ_API()
1139 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1140 bzf->strm.next_in = bzf->buf; in BZ_API()
1160 (void)BZ2_bzDecompressEnd ( &(bzf->strm) ); in BZ_API()
1186 bzf->strm.avail_out = len; in BZ_API()
1187 bzf->strm.next_out = buf; in BZ_API()
1194 if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { in BZ_API()
1200 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1201 bzf->strm.next_in = bzf->buf; in BZ_API()
1204 ret = BZ2_bzDecompress ( &(bzf->strm) ); in BZ_API()
1210 bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) in BZ_API()
1215 return len - bzf->strm.avail_out; }; in BZ_API()
1216 if (bzf->strm.avail_out == 0) in BZ_API()
1241 *nUnused = bzf->strm.avail_in; in BZ_API()
1242 *unused = bzf->strm.next_in; in BZ_API()
1261 bz_stream strm; in BZ_API() local
1272 strm.bzalloc = NULL; in BZ_API()
1273 strm.bzfree = NULL; in BZ_API()
1274 strm.opaque = NULL; in BZ_API()
1275 ret = BZ2_bzCompressInit ( &strm, blockSize100k, in BZ_API()
1279 strm.next_in = source; in BZ_API()
1280 strm.next_out = dest; in BZ_API()
1281 strm.avail_in = sourceLen; in BZ_API()
1282 strm.avail_out = *destLen; in BZ_API()
1284 ret = BZ2_bzCompress ( &strm, BZ_FINISH ); in BZ_API()
1289 *destLen -= strm.avail_out; in BZ_API()
1290 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1294 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1298 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1312 bz_stream strm; in BZ_API() local
1321 strm.bzalloc = NULL; in BZ_API()
1322 strm.bzfree = NULL; in BZ_API()
1323 strm.opaque = NULL; in BZ_API()
1324 ret = BZ2_bzDecompressInit ( &strm, verbosity, small ); in BZ_API()
1327 strm.next_in = source; in BZ_API()
1328 strm.next_out = dest; in BZ_API()
1329 strm.avail_in = sourceLen; in BZ_API()
1330 strm.avail_out = *destLen; in BZ_API()
1332 ret = BZ2_bzDecompress ( &strm ); in BZ_API()
1337 *destLen -= strm.avail_out; in BZ_API()
1338 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1342 if (strm.avail_out > 0) { in BZ_API()
1343 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1346 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1351 BZ2_bzDecompressEnd ( &strm ); in BZ_API()