Lines Matching refs:strm
149 ( bz_stream* strm, in BZ_API()
159 if (strm == NULL || in BZ_API()
165 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
166 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
170 s->strm = strm; in BZ_API()
203 strm->state = s; in BZ_API()
204 strm->total_in_lo32 = 0; in BZ_API()
205 strm->total_in_hi32 = 0; in BZ_API()
206 strm->total_out_lo32 = 0; in BZ_API()
207 strm->total_out_hi32 = 0; in BZ_API()
300 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
302 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
303 s->strm->next_in++; in copy_input_until_stop()
304 s->strm->avail_in--; in copy_input_until_stop()
305 s->strm->total_in_lo32++; in copy_input_until_stop()
306 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
316 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
320 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
321 s->strm->next_in++; in copy_input_until_stop()
322 s->strm->avail_in--; in copy_input_until_stop()
323 s->strm->total_in_lo32++; in copy_input_until_stop()
324 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
341 if (s->strm->avail_out == 0) break; in copy_output_until_stop()
347 *(s->strm->next_out) = s->zbits[s->state_out_pos]; in copy_output_until_stop()
349 s->strm->avail_out--; in copy_output_until_stop()
350 s->strm->next_out++; in copy_output_until_stop()
351 s->strm->total_out_lo32++; in copy_output_until_stop()
352 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in copy_output_until_stop()
361 Bool handle_compress ( bz_stream* strm ) in handle_compress() argument
365 EState* s = strm->state; in handle_compress()
395 if (s->strm->avail_in == 0) { in handle_compress()
407 int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action ) in BZ_API()
411 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
412 s = strm->state; in BZ_API()
414 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
424 progress = handle_compress ( strm ); in BZ_API()
429 s->avail_in_expect = strm->avail_in; in BZ_API()
435 s->avail_in_expect = strm->avail_in; in BZ_API()
444 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
446 progress = handle_compress ( strm ); in BZ_API()
454 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
456 progress = handle_compress ( strm ); in BZ_API()
468 int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm ) in BZ_API()
471 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
472 s = strm->state; in BZ_API()
474 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
479 BZFREE(strm->state); in BZ_API()
481 strm->state = NULL; in BZ_API()
493 ( bz_stream* strm, in BZ_API()
501 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
505 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
506 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
510 s->strm = strm; in BZ_API()
511 strm->state = s; in BZ_API()
516 strm->total_in_lo32 = 0; in BZ_API()
517 strm->total_in_hi32 = 0; in BZ_API()
518 strm->total_out_lo32 = 0; in BZ_API()
519 strm->total_out_hi32 = 0; in BZ_API()
545 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_FAST()
547 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_FAST()
550 s->strm->next_out++; in unRLE_obuf_to_output_FAST()
551 s->strm->avail_out--; in unRLE_obuf_to_output_FAST()
552 s->strm->total_out_lo32++; in unRLE_obuf_to_output_FAST()
553 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
599 char* cs_next_out = s->strm->next_out; in unRLE_obuf_to_output_FAST()
600 unsigned int cs_avail_out = s->strm->avail_out; in unRLE_obuf_to_output_FAST()
664 total_out_lo32_old = s->strm->total_out_lo32; in unRLE_obuf_to_output_FAST()
665 s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out); in unRLE_obuf_to_output_FAST()
666 if (s->strm->total_out_lo32 < total_out_lo32_old) in unRLE_obuf_to_output_FAST()
667 s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
677 s->strm->next_out = cs_next_out; in unRLE_obuf_to_output_FAST()
678 s->strm->avail_out = cs_avail_out; in unRLE_obuf_to_output_FAST()
715 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_SMALL()
717 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
720 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
721 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
722 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
723 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
764 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_SMALL()
766 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
769 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
770 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
771 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
772 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
808 int BZ_API(BZ2_bzDecompress) ( bz_stream *strm ) in BZ_API()
812 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
813 s = strm->state; in BZ_API()
815 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
862 int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm ) in BZ_API()
865 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
866 s = strm->state; in BZ_API()
868 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
874 BZFREE(strm->state); in BZ_API()
875 strm->state = NULL; in BZ_API()
898 bz_stream strm; member
946 bzf->strm.bzalloc = NULL; in BZ_API()
947 bzf->strm.bzfree = NULL; in BZ_API()
948 bzf->strm.opaque = NULL; in BZ_API()
951 ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, in BZ_API()
956 bzf->strm.avail_in = 0; in BZ_API()
984 bzf->strm.avail_in = len; in BZ_API()
985 bzf->strm.next_in = buf; in BZ_API()
988 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
989 bzf->strm.next_out = bzf->buf; in BZ_API()
990 ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN ); in BZ_API()
994 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
995 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1002 if (bzf->strm.avail_in == 0) in BZ_API()
1047 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1048 bzf->strm.next_out = bzf->buf; in BZ_API()
1049 ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH ); in BZ_API()
1053 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1054 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1072 *nbytes_in_lo32 = bzf->strm.total_in_lo32; in BZ_API()
1074 *nbytes_in_hi32 = bzf->strm.total_in_hi32; in BZ_API()
1076 *nbytes_out_lo32 = bzf->strm.total_out_lo32; in BZ_API()
1078 *nbytes_out_hi32 = bzf->strm.total_out_hi32; in BZ_API()
1081 BZ2_bzCompressEnd ( &(bzf->strm) ); in BZ_API()
1120 bzf->strm.bzalloc = NULL; in BZ_API()
1121 bzf->strm.bzfree = NULL; in BZ_API()
1122 bzf->strm.opaque = NULL; in BZ_API()
1130 ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small ); in BZ_API()
1134 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1135 bzf->strm.next_in = bzf->buf; in BZ_API()
1155 (void)BZ2_bzDecompressEnd ( &(bzf->strm) ); in BZ_API()
1181 bzf->strm.avail_out = len; in BZ_API()
1182 bzf->strm.next_out = buf; in BZ_API()
1189 if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { in BZ_API()
1195 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1196 bzf->strm.next_in = bzf->buf; in BZ_API()
1199 ret = BZ2_bzDecompress ( &(bzf->strm) ); in BZ_API()
1205 bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) in BZ_API()
1210 return len - bzf->strm.avail_out; }; in BZ_API()
1211 if (bzf->strm.avail_out == 0) in BZ_API()
1236 *nUnused = bzf->strm.avail_in; in BZ_API()
1237 *unused = bzf->strm.next_in; in BZ_API()
1256 bz_stream strm; in BZ_API() local
1267 strm.bzalloc = NULL; in BZ_API()
1268 strm.bzfree = NULL; in BZ_API()
1269 strm.opaque = NULL; in BZ_API()
1270 ret = BZ2_bzCompressInit ( &strm, blockSize100k, in BZ_API()
1274 strm.next_in = source; in BZ_API()
1275 strm.next_out = dest; in BZ_API()
1276 strm.avail_in = sourceLen; in BZ_API()
1277 strm.avail_out = *destLen; in BZ_API()
1279 ret = BZ2_bzCompress ( &strm, BZ_FINISH ); in BZ_API()
1284 *destLen -= strm.avail_out; in BZ_API()
1285 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1289 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1293 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1307 bz_stream strm; in BZ_API() local
1316 strm.bzalloc = NULL; in BZ_API()
1317 strm.bzfree = NULL; in BZ_API()
1318 strm.opaque = NULL; in BZ_API()
1319 ret = BZ2_bzDecompressInit ( &strm, verbosity, small ); in BZ_API()
1322 strm.next_in = source; in BZ_API()
1323 strm.next_out = dest; in BZ_API()
1324 strm.avail_in = sourceLen; in BZ_API()
1325 strm.avail_out = *destLen; in BZ_API()
1327 ret = BZ2_bzDecompress ( &strm ); in BZ_API()
1332 *destLen -= strm.avail_out; in BZ_API()
1333 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1337 if (strm.avail_out > 0) { in BZ_API()
1338 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1341 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1346 BZ2_bzDecompressEnd ( &strm ); in BZ_API()