Lines Matching refs:strm

200 		    ( bz_stream* strm,  in BZ_API()
210 if (strm == NULL || in BZ_API()
216 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
217 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
221 s->strm = strm; in BZ_API()
254 strm->state = s; in BZ_API()
255 strm->total_in_lo32 = 0; in BZ_API()
256 strm->total_in_hi32 = 0; in BZ_API()
257 strm->total_out_lo32 = 0; in BZ_API()
258 strm->total_out_hi32 = 0; in BZ_API()
351 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
353 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
354 s->strm->next_in++; in copy_input_until_stop()
355 s->strm->avail_in--; in copy_input_until_stop()
356 s->strm->total_in_lo32++; in copy_input_until_stop()
357 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
367 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
371 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
372 s->strm->next_in++; in copy_input_until_stop()
373 s->strm->avail_in--; in copy_input_until_stop()
374 s->strm->total_in_lo32++; in copy_input_until_stop()
375 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
392 if (s->strm->avail_out == 0) break; in copy_output_until_stop()
398 *(s->strm->next_out) = s->zbits[s->state_out_pos]; in copy_output_until_stop()
400 s->strm->avail_out--; in copy_output_until_stop()
401 s->strm->next_out++; in copy_output_until_stop()
402 s->strm->total_out_lo32++; in copy_output_until_stop()
403 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in copy_output_until_stop()
412 Bool handle_compress ( bz_stream* strm ) in handle_compress() argument
416 EState* s = strm->state; in handle_compress()
446 if (s->strm->avail_in == 0) { in handle_compress()
458 int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action ) in BZ_API()
462 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
463 s = strm->state; in BZ_API()
465 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
475 progress = handle_compress ( strm ); in BZ_API()
480 s->avail_in_expect = strm->avail_in; in BZ_API()
486 s->avail_in_expect = strm->avail_in; in BZ_API()
495 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
497 progress = handle_compress ( strm ); in BZ_API()
505 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
507 progress = handle_compress ( strm ); in BZ_API()
519 int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm ) in BZ_API()
522 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
523 s = strm->state; in BZ_API()
525 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
530 BZFREE(strm->state); in BZ_API()
532 strm->state = NULL; in BZ_API()
544 ( bz_stream* strm, in BZ_API()
552 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
556 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
557 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
561 s->strm = strm; in BZ_API()
562 strm->state = s; in BZ_API()
567 strm->total_in_lo32 = 0; in BZ_API()
568 strm->total_in_hi32 = 0; in BZ_API()
569 strm->total_out_lo32 = 0; in BZ_API()
570 strm->total_out_hi32 = 0; in BZ_API()
593 if (s->strm->avail_out == 0) return; in unRLE_obuf_to_output_FAST()
595 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_FAST()
598 s->strm->next_out++; in unRLE_obuf_to_output_FAST()
599 s->strm->avail_out--; in unRLE_obuf_to_output_FAST()
600 s->strm->total_out_lo32++; in unRLE_obuf_to_output_FAST()
601 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
644 char* cs_next_out = s->strm->next_out; in unRLE_obuf_to_output_FAST()
645 unsigned int cs_avail_out = s->strm->avail_out; in unRLE_obuf_to_output_FAST()
704 total_out_lo32_old = s->strm->total_out_lo32; in unRLE_obuf_to_output_FAST()
705 s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out); in unRLE_obuf_to_output_FAST()
706 if (s->strm->total_out_lo32 < total_out_lo32_old) in unRLE_obuf_to_output_FAST()
707 s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
717 s->strm->next_out = cs_next_out; in unRLE_obuf_to_output_FAST()
718 s->strm->avail_out = cs_avail_out; in unRLE_obuf_to_output_FAST()
750 if (s->strm->avail_out == 0) return; in unRLE_obuf_to_output_SMALL()
752 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
755 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
756 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
757 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
758 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
796 if (s->strm->avail_out == 0) return; in unRLE_obuf_to_output_SMALL()
798 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
801 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
802 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
803 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
804 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
836 int BZ_API(BZ2_bzDecompress) ( bz_stream *strm ) in BZ_API()
839 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
840 s = strm->state; in BZ_API()
842 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
891 int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm ) in BZ_API()
894 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
895 s = strm->state; in BZ_API()
897 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
903 BZFREE(strm->state); in BZ_API()
904 strm->state = NULL; in BZ_API()
927 bz_stream strm; member
975 bzf->strm.bzalloc = NULL; in BZ_API()
976 bzf->strm.bzfree = NULL; in BZ_API()
977 bzf->strm.opaque = NULL; in BZ_API()
980 ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, in BZ_API()
985 bzf->strm.avail_in = 0; in BZ_API()
1012 bzf->strm.avail_in = len; in BZ_API()
1013 bzf->strm.next_in = buf; in BZ_API()
1016 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1017 bzf->strm.next_out = bzf->buf; in BZ_API()
1018 ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN ); in BZ_API()
1022 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1023 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1030 if (bzf->strm.avail_in == 0) in BZ_API()
1075 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1076 bzf->strm.next_out = bzf->buf; in BZ_API()
1077 ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH ); in BZ_API()
1081 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1082 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1100 *nbytes_in_lo32 = bzf->strm.total_in_lo32; in BZ_API()
1102 *nbytes_in_hi32 = bzf->strm.total_in_hi32; in BZ_API()
1104 *nbytes_out_lo32 = bzf->strm.total_out_lo32; in BZ_API()
1106 *nbytes_out_hi32 = bzf->strm.total_out_hi32; in BZ_API()
1109 BZ2_bzCompressEnd ( &(bzf->strm) ); in BZ_API()
1148 bzf->strm.bzalloc = NULL; in BZ_API()
1149 bzf->strm.bzfree = NULL; in BZ_API()
1150 bzf->strm.opaque = NULL; in BZ_API()
1158 ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small ); in BZ_API()
1162 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1163 bzf->strm.next_in = bzf->buf; in BZ_API()
1183 (void)BZ2_bzDecompressEnd ( &(bzf->strm) ); in BZ_API()
1209 bzf->strm.avail_out = len; in BZ_API()
1210 bzf->strm.next_out = buf; in BZ_API()
1217 if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { in BZ_API()
1223 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1224 bzf->strm.next_in = bzf->buf; in BZ_API()
1227 ret = BZ2_bzDecompress ( &(bzf->strm) ); in BZ_API()
1233 bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) in BZ_API()
1238 return len - bzf->strm.avail_out; }; in BZ_API()
1239 if (bzf->strm.avail_out == 0) in BZ_API()
1264 *nUnused = bzf->strm.avail_in; in BZ_API()
1265 *unused = bzf->strm.next_in; in BZ_API()
1284 bz_stream strm; in BZ_API() local
1295 strm.bzalloc = NULL; in BZ_API()
1296 strm.bzfree = NULL; in BZ_API()
1297 strm.opaque = NULL; in BZ_API()
1298 ret = BZ2_bzCompressInit ( &strm, blockSize100k, in BZ_API()
1302 strm.next_in = source; in BZ_API()
1303 strm.next_out = dest; in BZ_API()
1304 strm.avail_in = sourceLen; in BZ_API()
1305 strm.avail_out = *destLen; in BZ_API()
1307 ret = BZ2_bzCompress ( &strm, BZ_FINISH ); in BZ_API()
1312 *destLen -= strm.avail_out; in BZ_API()
1313 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1317 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1321 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1335 bz_stream strm; in BZ_API() local
1341 strm.bzalloc = NULL; in BZ_API()
1342 strm.bzfree = NULL; in BZ_API()
1343 strm.opaque = NULL; in BZ_API()
1344 ret = BZ2_bzDecompressInit ( &strm, verbosity, small ); in BZ_API()
1347 strm.next_in = source; in BZ_API()
1348 strm.next_out = dest; in BZ_API()
1349 strm.avail_in = sourceLen; in BZ_API()
1350 strm.avail_out = *destLen; in BZ_API()
1352 ret = BZ2_bzDecompress ( &strm ); in BZ_API()
1353 *destLen -= strm.avail_out; in BZ_API()
1358 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1362 if (strm.avail_out > 0) { in BZ_API()
1363 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1366 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1371 BZ2_bzDecompressEnd ( &strm ); in BZ_API()