Lines Matching refs:strm
227 ( bz_stream* strm, in BZ_API()
237 if (strm == NULL || in BZ_API()
243 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
244 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
248 s->strm = strm; in BZ_API()
281 strm->state = s; in BZ_API()
282 strm->total_in_lo32 = 0; in BZ_API()
283 strm->total_in_hi32 = 0; in BZ_API()
284 strm->total_out_lo32 = 0; in BZ_API()
285 strm->total_out_hi32 = 0; in BZ_API()
317 int BZ_API(BZ2_bzCompressReset) ( bz_stream *strm ) in BZ_API()
319 EState* s = strm->state; in BZ_API()
324 s->strm = strm; in BZ_API()
337 strm->state = s; in BZ_API()
338 strm->total_in_lo32 = 0; in BZ_API()
339 strm->total_in_hi32 = 0; in BZ_API()
340 strm->total_out_lo32 = 0; in BZ_API()
341 strm->total_out_hi32 = 0; in BZ_API()
347 int BZ_API(BZ2_bzDecompressReset) ( bz_stream* strm ) in BZ_API()
349 DState* s = strm->state; in BZ_API()
353 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
355 s->strm = strm; in BZ_API()
361 strm->total_in_lo32 = 0; in BZ_API()
362 strm->total_in_hi32 = 0; in BZ_API()
363 strm->total_out_lo32 = 0; in BZ_API()
364 strm->total_out_hi32 = 0; in BZ_API()
462 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
464 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
465 s->strm->next_in++; in copy_input_until_stop()
466 s->strm->avail_in--; in copy_input_until_stop()
467 s->strm->total_in_lo32++; in copy_input_until_stop()
468 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
478 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
482 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
483 s->strm->next_in++; in copy_input_until_stop()
484 s->strm->avail_in--; in copy_input_until_stop()
485 s->strm->total_in_lo32++; in copy_input_until_stop()
486 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
503 if (s->strm->avail_out == 0) break; in copy_output_until_stop()
509 *(s->strm->next_out) = s->zbits[s->state_out_pos]; in copy_output_until_stop()
511 s->strm->avail_out--; in copy_output_until_stop()
512 s->strm->next_out++; in copy_output_until_stop()
513 s->strm->total_out_lo32++; in copy_output_until_stop()
514 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in copy_output_until_stop()
523 Bool handle_compress ( bz_stream* strm ) in handle_compress() argument
527 EState* s = strm->state; in handle_compress()
557 if (s->strm->avail_in == 0) { in handle_compress()
569 int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action ) in BZ_API()
573 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
574 s = strm->state; in BZ_API()
576 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
586 progress = handle_compress ( strm ); in BZ_API()
591 s->avail_in_expect = strm->avail_in; in BZ_API()
597 s->avail_in_expect = strm->avail_in; in BZ_API()
606 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
608 progress = handle_compress ( strm ); in BZ_API()
616 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
618 progress = handle_compress ( strm ); in BZ_API()
630 int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm ) in BZ_API()
633 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
634 s = strm->state; in BZ_API()
636 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
641 BZFREE(strm->state); in BZ_API()
643 strm->state = NULL; in BZ_API()
655 ( bz_stream* strm, in BZ_API()
663 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
667 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
668 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
672 s->strm = strm; in BZ_API()
673 strm->state = s; in BZ_API()
678 strm->total_in_lo32 = 0; in BZ_API()
679 strm->total_in_hi32 = 0; in BZ_API()
680 strm->total_out_lo32 = 0; in BZ_API()
681 strm->total_out_hi32 = 0; in BZ_API()
707 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_FAST()
709 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_FAST()
712 s->strm->next_out++; in unRLE_obuf_to_output_FAST()
713 s->strm->avail_out--; in unRLE_obuf_to_output_FAST()
714 s->strm->total_out_lo32++; in unRLE_obuf_to_output_FAST()
715 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
761 char* cs_next_out = s->strm->next_out; in unRLE_obuf_to_output_FAST()
762 unsigned int cs_avail_out = s->strm->avail_out; in unRLE_obuf_to_output_FAST()
826 total_out_lo32_old = s->strm->total_out_lo32; in unRLE_obuf_to_output_FAST()
827 s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out); in unRLE_obuf_to_output_FAST()
828 if (s->strm->total_out_lo32 < total_out_lo32_old) in unRLE_obuf_to_output_FAST()
829 s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
839 s->strm->next_out = cs_next_out; in unRLE_obuf_to_output_FAST()
840 s->strm->avail_out = cs_avail_out; in unRLE_obuf_to_output_FAST()
877 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_SMALL()
879 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
882 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
883 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
884 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
885 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
926 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_SMALL()
928 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
931 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
932 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
933 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
934 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
970 int BZ_API(BZ2_bzDecompress) ( bz_stream *strm ) in BZ_API()
974 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
975 s = strm->state; in BZ_API()
977 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
1026 int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm ) in BZ_API()
1029 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
1030 s = strm->state; in BZ_API()
1032 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
1038 BZFREE(strm->state); in BZ_API()
1039 strm->state = NULL; in BZ_API()
1062 bz_stream strm; member
1110 bzf->strm.bzalloc = NULL; in BZ_API()
1111 bzf->strm.bzfree = NULL; in BZ_API()
1112 bzf->strm.opaque = NULL; in BZ_API()
1115 ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, in BZ_API()
1120 bzf->strm.avail_in = 0; in BZ_API()
1148 bzf->strm.avail_in = len; in BZ_API()
1149 bzf->strm.next_in = buf; in BZ_API()
1152 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1153 bzf->strm.next_out = bzf->buf; in BZ_API()
1154 ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN ); in BZ_API()
1158 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1159 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1166 if (bzf->strm.avail_in == 0) in BZ_API()
1211 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1212 bzf->strm.next_out = bzf->buf; in BZ_API()
1213 ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH ); in BZ_API()
1217 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1218 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1236 *nbytes_in_lo32 = bzf->strm.total_in_lo32; in BZ_API()
1238 *nbytes_in_hi32 = bzf->strm.total_in_hi32; in BZ_API()
1240 *nbytes_out_lo32 = bzf->strm.total_out_lo32; in BZ_API()
1242 *nbytes_out_hi32 = bzf->strm.total_out_hi32; in BZ_API()
1245 (void) BZ2_bzCompressEnd ( &(bzf->strm) ); in BZ_API()
1284 bzf->strm.bzalloc = NULL; in BZ_API()
1285 bzf->strm.bzfree = NULL; in BZ_API()
1286 bzf->strm.opaque = NULL; in BZ_API()
1294 ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small ); in BZ_API()
1298 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1299 bzf->strm.next_in = bzf->buf; in BZ_API()
1319 (void) BZ2_bzDecompressEnd ( &(bzf->strm) ); in BZ_API()
1345 bzf->strm.avail_out = len; in BZ_API()
1346 bzf->strm.next_out = buf; in BZ_API()
1353 if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { in BZ_API()
1359 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1360 bzf->strm.next_in = bzf->buf; in BZ_API()
1363 ret = BZ2_bzDecompress ( &(bzf->strm) ); in BZ_API()
1369 bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) in BZ_API()
1374 return len - bzf->strm.avail_out; }; in BZ_API()
1375 if (bzf->strm.avail_out == 0) in BZ_API()
1400 *nUnused = bzf->strm.avail_in; in BZ_API()
1401 *unused = bzf->strm.next_in; in BZ_API()
1420 bz_stream strm; in BZ_API() local
1431 strm.bzalloc = NULL; in BZ_API()
1432 strm.bzfree = NULL; in BZ_API()
1433 strm.opaque = NULL; in BZ_API()
1434 ret = BZ2_bzCompressInit ( &strm, blockSize100k, in BZ_API()
1438 strm.next_in = source; in BZ_API()
1439 strm.next_out = dest; in BZ_API()
1440 strm.avail_in = sourceLen; in BZ_API()
1441 strm.avail_out = *destLen; in BZ_API()
1443 ret = BZ2_bzCompress ( &strm, BZ_FINISH ); in BZ_API()
1448 *destLen -= strm.avail_out; in BZ_API()
1449 (void) BZ2_bzCompressEnd ( &strm ); in BZ_API()
1453 (void) BZ2_bzCompressEnd ( &strm ); in BZ_API()
1457 (void) BZ2_bzCompressEnd ( &strm ); in BZ_API()
1471 bz_stream strm; in BZ_API() local
1480 strm.bzalloc = NULL; in BZ_API()
1481 strm.bzfree = NULL; in BZ_API()
1482 strm.opaque = NULL; in BZ_API()
1483 ret = BZ2_bzDecompressInit ( &strm, verbosity, small ); in BZ_API()
1486 strm.next_in = source; in BZ_API()
1487 strm.next_out = dest; in BZ_API()
1488 strm.avail_in = sourceLen; in BZ_API()
1489 strm.avail_out = *destLen; in BZ_API()
1491 ret = BZ2_bzDecompress ( &strm ); in BZ_API()
1496 *destLen -= strm.avail_out; in BZ_API()
1497 (void) BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1501 if (strm.avail_out > 0) { in BZ_API()
1502 (void) BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1505 (void) BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1510 (void) BZ2_bzDecompressEnd ( &strm ); in BZ_API()