Lines Matching refs:strm
232 ( bz_stream* strm, in BZ_API()
242 if (strm == NULL || in BZ_API()
248 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
249 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
253 s->strm = strm; in BZ_API()
286 strm->state = s; in BZ_API()
287 strm->total_in_lo32 = 0; in BZ_API()
288 strm->total_in_hi32 = 0; in BZ_API()
289 strm->total_out_lo32 = 0; in BZ_API()
290 strm->total_out_hi32 = 0; in BZ_API()
322 int BZ_API(BZ2_bzCompressReset) ( bz_stream *strm ) in BZ_API()
324 EState* s = strm->state; in BZ_API()
329 s->strm = strm; in BZ_API()
342 strm->state = s; in BZ_API()
343 strm->total_in_lo32 = 0; in BZ_API()
344 strm->total_in_hi32 = 0; in BZ_API()
345 strm->total_out_lo32 = 0; in BZ_API()
346 strm->total_out_hi32 = 0; in BZ_API()
439 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
441 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
442 s->strm->next_in++; in copy_input_until_stop()
443 s->strm->avail_in--; in copy_input_until_stop()
444 s->strm->total_in_lo32++; in copy_input_until_stop()
445 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
455 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
459 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
460 s->strm->next_in++; in copy_input_until_stop()
461 s->strm->avail_in--; in copy_input_until_stop()
462 s->strm->total_in_lo32++; in copy_input_until_stop()
463 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
480 if (s->strm->avail_out == 0) break; in copy_output_until_stop()
486 *(s->strm->next_out) = s->zbits[s->state_out_pos]; in copy_output_until_stop()
488 s->strm->avail_out--; in copy_output_until_stop()
489 s->strm->next_out++; in copy_output_until_stop()
490 s->strm->total_out_lo32++; in copy_output_until_stop()
491 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in copy_output_until_stop()
500 Bool handle_compress ( bz_stream* strm ) in handle_compress() argument
504 EState* s = strm->state; in handle_compress()
534 if (s->strm->avail_in == 0) { in handle_compress()
546 int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action ) in BZ_API()
550 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
551 s = strm->state; in BZ_API()
553 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
563 progress = handle_compress ( strm ); in BZ_API()
568 s->avail_in_expect = strm->avail_in; in BZ_API()
574 s->avail_in_expect = strm->avail_in; in BZ_API()
583 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
585 progress = handle_compress ( strm ); in BZ_API()
593 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
595 progress = handle_compress ( strm ); in BZ_API()
607 int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm ) in BZ_API()
610 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
611 s = strm->state; in BZ_API()
613 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
618 BZFREE(strm->state); in BZ_API()
620 strm->state = NULL; in BZ_API()
633 ( bz_stream* strm, in BZ_API()
641 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
645 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
646 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
650 s->strm = strm; in BZ_API()
651 strm->state = s; in BZ_API()
656 strm->total_in_lo32 = 0; in BZ_API()
657 strm->total_in_hi32 = 0; in BZ_API()
658 strm->total_out_lo32 = 0; in BZ_API()
659 strm->total_out_hi32 = 0; in BZ_API()
674 int BZ_API(BZ2_bzDecompressReset) ( bz_stream* strm ) in BZ_API()
680 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
682 s = strm->state; in BZ_API()
683 s->strm = strm; in BZ_API()
689 strm->total_in_lo32 = 0; in BZ_API()
690 strm->total_in_hi32 = 0; in BZ_API()
691 strm->total_out_lo32 = 0; in BZ_API()
692 strm->total_out_hi32 = 0; in BZ_API()
718 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_FAST()
720 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_FAST()
723 s->strm->next_out++; in unRLE_obuf_to_output_FAST()
724 s->strm->avail_out--; in unRLE_obuf_to_output_FAST()
725 s->strm->total_out_lo32++; in unRLE_obuf_to_output_FAST()
726 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
772 char* cs_next_out = s->strm->next_out; in unRLE_obuf_to_output_FAST()
773 unsigned int cs_avail_out = s->strm->avail_out; in unRLE_obuf_to_output_FAST()
841 total_out_lo32_old = s->strm->total_out_lo32; in unRLE_obuf_to_output_FAST()
842 s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out); in unRLE_obuf_to_output_FAST()
843 if (s->strm->total_out_lo32 < total_out_lo32_old) in unRLE_obuf_to_output_FAST()
844 s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
854 s->strm->next_out = cs_next_out; in unRLE_obuf_to_output_FAST()
855 s->strm->avail_out = cs_avail_out; in unRLE_obuf_to_output_FAST()
892 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_SMALL()
894 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
897 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
898 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
899 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
900 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
941 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_SMALL()
943 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
946 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
947 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
948 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
949 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
989 int BZ_API(BZ2_bzDecompress) ( bz_stream *strm ) in BZ_API()
993 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
994 s = strm->state; in BZ_API()
996 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
1045 int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm ) in BZ_API()
1048 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
1049 s = strm->state; in BZ_API()
1051 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
1057 BZFREE(strm->state); in BZ_API()
1058 strm->state = NULL; in BZ_API()
1082 bz_stream strm; member
1130 bzf->strm.bzalloc = NULL; in BZ_API()
1131 bzf->strm.bzfree = NULL; in BZ_API()
1132 bzf->strm.opaque = NULL; in BZ_API()
1135 ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, in BZ_API()
1140 bzf->strm.avail_in = 0; in BZ_API()
1168 bzf->strm.avail_in = len; in BZ_API()
1169 bzf->strm.next_in = buf; in BZ_API()
1172 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1173 bzf->strm.next_out = bzf->buf; in BZ_API()
1174 ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN ); in BZ_API()
1178 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1179 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1186 if (bzf->strm.avail_in == 0) in BZ_API()
1231 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1232 bzf->strm.next_out = bzf->buf; in BZ_API()
1233 ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH ); in BZ_API()
1237 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1238 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1256 *nbytes_in_lo32 = bzf->strm.total_in_lo32; in BZ_API()
1258 *nbytes_in_hi32 = bzf->strm.total_in_hi32; in BZ_API()
1260 *nbytes_out_lo32 = bzf->strm.total_out_lo32; in BZ_API()
1262 *nbytes_out_hi32 = bzf->strm.total_out_hi32; in BZ_API()
1265 (void) BZ2_bzCompressEnd ( &(bzf->strm) ); in BZ_API()
1304 bzf->strm.bzalloc = NULL; in BZ_API()
1305 bzf->strm.bzfree = NULL; in BZ_API()
1306 bzf->strm.opaque = NULL; in BZ_API()
1314 ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small ); in BZ_API()
1318 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1319 bzf->strm.next_in = bzf->buf; in BZ_API()
1339 (void) BZ2_bzDecompressEnd ( &(bzf->strm) ); in BZ_API()
1365 bzf->strm.avail_out = len; in BZ_API()
1366 bzf->strm.next_out = buf; in BZ_API()
1373 if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { in BZ_API()
1379 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1380 bzf->strm.next_in = bzf->buf; in BZ_API()
1383 ret = BZ2_bzDecompress ( &(bzf->strm) ); in BZ_API()
1389 bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) in BZ_API()
1394 return len - bzf->strm.avail_out; }; in BZ_API()
1395 if (bzf->strm.avail_out == 0) in BZ_API()
1420 *nUnused = bzf->strm.avail_in; in BZ_API()
1421 *unused = bzf->strm.next_in; in BZ_API()
1440 bz_stream strm; in BZ_API() local
1451 strm.bzalloc = NULL; in BZ_API()
1452 strm.bzfree = NULL; in BZ_API()
1453 strm.opaque = NULL; in BZ_API()
1454 ret = BZ2_bzCompressInit ( &strm, blockSize100k, in BZ_API()
1458 strm.next_in = source; in BZ_API()
1459 strm.next_out = dest; in BZ_API()
1460 strm.avail_in = sourceLen; in BZ_API()
1461 strm.avail_out = *destLen; in BZ_API()
1463 ret = BZ2_bzCompress ( &strm, BZ_FINISH ); in BZ_API()
1468 *destLen -= strm.avail_out; in BZ_API()
1469 (void) BZ2_bzCompressEnd ( &strm ); in BZ_API()
1473 (void) BZ2_bzCompressEnd ( &strm ); in BZ_API()
1477 (void) BZ2_bzCompressEnd ( &strm ); in BZ_API()
1491 bz_stream strm; in BZ_API() local
1500 strm.bzalloc = NULL; in BZ_API()
1501 strm.bzfree = NULL; in BZ_API()
1502 strm.opaque = NULL; in BZ_API()
1503 ret = BZ2_bzDecompressInit ( &strm, verbosity, small ); in BZ_API()
1506 strm.next_in = source; in BZ_API()
1507 strm.next_out = dest; in BZ_API()
1508 strm.avail_in = sourceLen; in BZ_API()
1509 strm.avail_out = *destLen; in BZ_API()
1511 ret = BZ2_bzDecompress ( &strm ); in BZ_API()
1516 *destLen -= strm.avail_out; in BZ_API()
1517 (void) BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1521 if (strm.avail_out > 0) { in BZ_API()
1522 (void) BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1525 (void) BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1530 (void) BZ2_bzDecompressEnd ( &strm ); in BZ_API()