Lines Matching refs:strm
155 ( bz_stream* strm, in BZ_API()
165 if (strm == NULL || in BZ_API()
171 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
172 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
176 s->strm = strm; in BZ_API()
209 strm->state = s; in BZ_API()
210 strm->total_in_lo32 = 0; in BZ_API()
211 strm->total_in_hi32 = 0; in BZ_API()
212 strm->total_out_lo32 = 0; in BZ_API()
213 strm->total_out_hi32 = 0; in BZ_API()
306 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
308 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
309 s->strm->next_in++; in copy_input_until_stop()
310 s->strm->avail_in--; in copy_input_until_stop()
311 s->strm->total_in_lo32++; in copy_input_until_stop()
312 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
322 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
326 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
327 s->strm->next_in++; in copy_input_until_stop()
328 s->strm->avail_in--; in copy_input_until_stop()
329 s->strm->total_in_lo32++; in copy_input_until_stop()
330 if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; in copy_input_until_stop()
347 if (s->strm->avail_out == 0) break; in copy_output_until_stop()
353 *(s->strm->next_out) = s->zbits[s->state_out_pos]; in copy_output_until_stop()
355 s->strm->avail_out--; in copy_output_until_stop()
356 s->strm->next_out++; in copy_output_until_stop()
357 s->strm->total_out_lo32++; in copy_output_until_stop()
358 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in copy_output_until_stop()
367 Bool handle_compress ( bz_stream* strm ) in handle_compress() argument
371 EState* s = strm->state; in handle_compress()
401 if (s->strm->avail_in == 0) { in handle_compress()
413 int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action ) in BZ_API()
417 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
418 s = strm->state; in BZ_API()
420 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
430 progress = handle_compress ( strm ); in BZ_API()
435 s->avail_in_expect = strm->avail_in; in BZ_API()
441 s->avail_in_expect = strm->avail_in; in BZ_API()
450 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
452 progress = handle_compress ( strm ); in BZ_API()
460 if (s->avail_in_expect != s->strm->avail_in) in BZ_API()
462 progress = handle_compress ( strm ); in BZ_API()
474 int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm ) in BZ_API()
477 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
478 s = strm->state; in BZ_API()
480 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
485 BZFREE(strm->state); in BZ_API()
487 strm->state = NULL; in BZ_API()
500 ( bz_stream* strm, in BZ_API()
508 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
512 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
513 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
517 s->strm = strm; in BZ_API()
518 strm->state = s; in BZ_API()
523 strm->total_in_lo32 = 0; in BZ_API()
524 strm->total_in_hi32 = 0; in BZ_API()
525 strm->total_out_lo32 = 0; in BZ_API()
526 strm->total_out_hi32 = 0; in BZ_API()
552 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_FAST()
554 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_FAST()
557 s->strm->next_out++; in unRLE_obuf_to_output_FAST()
558 s->strm->avail_out--; in unRLE_obuf_to_output_FAST()
559 s->strm->total_out_lo32++; in unRLE_obuf_to_output_FAST()
560 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
606 char* cs_next_out = s->strm->next_out; in unRLE_obuf_to_output_FAST()
607 unsigned int cs_avail_out = s->strm->avail_out; in unRLE_obuf_to_output_FAST()
671 total_out_lo32_old = s->strm->total_out_lo32; in unRLE_obuf_to_output_FAST()
672 s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out); in unRLE_obuf_to_output_FAST()
673 if (s->strm->total_out_lo32 < total_out_lo32_old) in unRLE_obuf_to_output_FAST()
674 s->strm->total_out_hi32++; in unRLE_obuf_to_output_FAST()
684 s->strm->next_out = cs_next_out; in unRLE_obuf_to_output_FAST()
685 s->strm->avail_out = cs_avail_out; in unRLE_obuf_to_output_FAST()
722 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_SMALL()
724 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
727 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
728 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
729 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
730 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
771 if (s->strm->avail_out == 0) return False; in unRLE_obuf_to_output_SMALL()
773 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
776 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
777 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
778 s->strm->total_out_lo32++; in unRLE_obuf_to_output_SMALL()
779 if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; in unRLE_obuf_to_output_SMALL()
815 int BZ_API(BZ2_bzDecompress) ( bz_stream *strm ) in BZ_API()
819 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
820 s = strm->state; in BZ_API()
822 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
869 int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm ) in BZ_API()
872 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
873 s = strm->state; in BZ_API()
875 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
881 BZFREE(strm->state); in BZ_API()
882 strm->state = NULL; in BZ_API()
906 bz_stream strm; member
954 bzf->strm.bzalloc = NULL; in BZ_API()
955 bzf->strm.bzfree = NULL; in BZ_API()
956 bzf->strm.opaque = NULL; in BZ_API()
959 ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, in BZ_API()
964 bzf->strm.avail_in = 0; in BZ_API()
992 bzf->strm.avail_in = len; in BZ_API()
993 bzf->strm.next_in = buf; in BZ_API()
996 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
997 bzf->strm.next_out = bzf->buf; in BZ_API()
998 ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN ); in BZ_API()
1002 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1003 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1010 if (bzf->strm.avail_in == 0) in BZ_API()
1055 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1056 bzf->strm.next_out = bzf->buf; in BZ_API()
1057 ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH ); in BZ_API()
1061 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1062 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1080 *nbytes_in_lo32 = bzf->strm.total_in_lo32; in BZ_API()
1082 *nbytes_in_hi32 = bzf->strm.total_in_hi32; in BZ_API()
1084 *nbytes_out_lo32 = bzf->strm.total_out_lo32; in BZ_API()
1086 *nbytes_out_hi32 = bzf->strm.total_out_hi32; in BZ_API()
1089 BZ2_bzCompressEnd ( &(bzf->strm) ); in BZ_API()
1128 bzf->strm.bzalloc = NULL; in BZ_API()
1129 bzf->strm.bzfree = NULL; in BZ_API()
1130 bzf->strm.opaque = NULL; in BZ_API()
1138 ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small ); in BZ_API()
1142 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1143 bzf->strm.next_in = bzf->buf; in BZ_API()
1163 (void)BZ2_bzDecompressEnd ( &(bzf->strm) ); in BZ_API()
1189 bzf->strm.avail_out = len; in BZ_API()
1190 bzf->strm.next_out = buf; in BZ_API()
1197 if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { in BZ_API()
1203 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1204 bzf->strm.next_in = bzf->buf; in BZ_API()
1207 ret = BZ2_bzDecompress ( &(bzf->strm) ); in BZ_API()
1213 bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) in BZ_API()
1218 return len - bzf->strm.avail_out; }; in BZ_API()
1219 if (bzf->strm.avail_out == 0) in BZ_API()
1244 *nUnused = bzf->strm.avail_in; in BZ_API()
1245 *unused = bzf->strm.next_in; in BZ_API()
1264 bz_stream strm; in BZ_API() local
1275 strm.bzalloc = NULL; in BZ_API()
1276 strm.bzfree = NULL; in BZ_API()
1277 strm.opaque = NULL; in BZ_API()
1278 ret = BZ2_bzCompressInit ( &strm, blockSize100k, in BZ_API()
1282 strm.next_in = source; in BZ_API()
1283 strm.next_out = dest; in BZ_API()
1284 strm.avail_in = sourceLen; in BZ_API()
1285 strm.avail_out = *destLen; in BZ_API()
1287 ret = BZ2_bzCompress ( &strm, BZ_FINISH ); in BZ_API()
1292 *destLen -= strm.avail_out; in BZ_API()
1293 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1297 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1301 BZ2_bzCompressEnd ( &strm ); in BZ_API()
1315 bz_stream strm; in BZ_API() local
1324 strm.bzalloc = NULL; in BZ_API()
1325 strm.bzfree = NULL; in BZ_API()
1326 strm.opaque = NULL; in BZ_API()
1327 ret = BZ2_bzDecompressInit ( &strm, verbosity, small ); in BZ_API()
1330 strm.next_in = source; in BZ_API()
1331 strm.next_out = dest; in BZ_API()
1332 strm.avail_in = sourceLen; in BZ_API()
1333 strm.avail_out = *destLen; in BZ_API()
1335 ret = BZ2_bzDecompress ( &strm ); in BZ_API()
1340 *destLen -= strm.avail_out; in BZ_API()
1341 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1345 if (strm.avail_out > 0) { in BZ_API()
1346 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1349 BZ2_bzDecompressEnd ( &strm ); in BZ_API()
1354 BZ2_bzDecompressEnd ( &strm ); in BZ_API()