Lines Matching refs:strm

153                     ( bz_stream* strm,   in BZ_API()
161 if (strm == NULL || in BZ_API()
167 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
168 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
172 s->strm = strm; in BZ_API()
205 strm->state = s; in BZ_API()
206 strm->total_in = 0; in BZ_API()
207 strm->total_out = 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++; in copy_input_until_stop()
315 if (s->strm->avail_in == 0) break; in copy_input_until_stop()
319 ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); in copy_input_until_stop()
320 s->strm->next_in++; in copy_input_until_stop()
321 s->strm->avail_in--; in copy_input_until_stop()
322 s->strm->total_in++; in copy_input_until_stop()
339 if (s->strm->avail_out == 0) break; in copy_output_until_stop()
345 *(s->strm->next_out) = s->zbits[s->state_out_pos]; in copy_output_until_stop()
347 s->strm->avail_out--; in copy_output_until_stop()
348 s->strm->next_out++; in copy_output_until_stop()
349 s->strm->total_out++; in copy_output_until_stop()
359 Bool handle_compress ( bz_stream* strm ) in handle_compress() argument
363 EState* s = strm->state; in handle_compress()
393 if (s->strm->avail_in == 0) { in handle_compress()
405 int BZ_API(bzCompress) ( bz_stream *strm, int action ) in BZ_API()
409 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
410 s = strm->state; in BZ_API()
412 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
422 progress = handle_compress ( strm ); in BZ_API()
427 s->avail_in_expect = strm->avail_in; in BZ_API()
433 s->avail_in_expect = strm->avail_in; in BZ_API()
442 if (s->avail_in_expect != s->strm->avail_in) return BZ_SEQUENCE_ERROR; in BZ_API()
443 progress = handle_compress ( strm ); in BZ_API()
451 if (s->avail_in_expect != s->strm->avail_in) return BZ_SEQUENCE_ERROR; in BZ_API()
452 progress = handle_compress ( strm ); in BZ_API()
464 int BZ_API(bzCompressEnd) ( bz_stream *strm ) in BZ_API()
467 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
468 s = strm->state; in BZ_API()
470 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
475 BZFREE(strm->state); in BZ_API()
477 strm->state = NULL; in BZ_API()
489 ( bz_stream* strm, in BZ_API()
495 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
499 if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; in BZ_API()
500 if (strm->bzfree == NULL) strm->bzfree = default_bzfree; in BZ_API()
504 s->strm = strm; in BZ_API()
505 strm->state = s; in BZ_API()
510 strm->total_in = 0; in BZ_API()
511 strm->total_out = 0; in BZ_API()
534 if (s->strm->avail_out == 0) return; in unRLE_obuf_to_output_FAST()
536 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_FAST()
539 s->strm->next_out++; in unRLE_obuf_to_output_FAST()
540 s->strm->avail_out--; in unRLE_obuf_to_output_FAST()
541 s->strm->total_out++; in unRLE_obuf_to_output_FAST()
584 char* cs_next_out = s->strm->next_out; in unRLE_obuf_to_output_FAST()
585 unsigned int cs_avail_out = s->strm->avail_out; in unRLE_obuf_to_output_FAST()
643 s->strm->total_out += (avail_out_INIT - cs_avail_out); in unRLE_obuf_to_output_FAST()
653 s->strm->next_out = cs_next_out; in unRLE_obuf_to_output_FAST()
654 s->strm->avail_out = cs_avail_out; in unRLE_obuf_to_output_FAST()
687 if (s->strm->avail_out == 0) return; in unRLE_obuf_to_output_SMALL()
689 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
692 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
693 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
694 s->strm->total_out++; in unRLE_obuf_to_output_SMALL()
732 if (s->strm->avail_out == 0) return; in unRLE_obuf_to_output_SMALL()
734 *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; in unRLE_obuf_to_output_SMALL()
737 s->strm->next_out++; in unRLE_obuf_to_output_SMALL()
738 s->strm->avail_out--; in unRLE_obuf_to_output_SMALL()
739 s->strm->total_out++; in unRLE_obuf_to_output_SMALL()
771 int BZ_API(bzDecompress) ( bz_stream *strm ) in BZ_API()
774 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
775 s = strm->state; in BZ_API()
777 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
823 int BZ_API(bzDecompressEnd) ( bz_stream *strm ) in BZ_API()
826 if (strm == NULL) return BZ_PARAM_ERROR; in BZ_API()
827 s = strm->state; in BZ_API()
829 if (s->strm != strm) return BZ_PARAM_ERROR; in BZ_API()
835 BZFREE(strm->state); in BZ_API()
836 strm->state = NULL; in BZ_API()
859 bz_stream strm; member
907 bzf->strm.bzalloc = NULL; in BZ_API()
908 bzf->strm.bzfree = NULL; in BZ_API()
909 bzf->strm.opaque = NULL; in BZ_API()
912 ret = bzCompressInit ( &(bzf->strm), blockSize100k, in BZ_API()
917 bzf->strm.avail_in = 0; in BZ_API()
945 bzf->strm.avail_in = len; in BZ_API()
946 bzf->strm.next_in = buf; in BZ_API()
949 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
950 bzf->strm.next_out = bzf->buf; in BZ_API()
951 ret = bzCompress ( &(bzf->strm), BZ_RUN ); in BZ_API()
955 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
956 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
963 if (bzf->strm.avail_in == 0) in BZ_API()
992 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
993 bzf->strm.next_out = bzf->buf; in BZ_API()
994 ret = bzCompress ( &(bzf->strm), BZ_FINISH ); in BZ_API()
998 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
999 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1016 if (nbytes_in != NULL) *nbytes_in = bzf->strm.total_in; in BZ_API()
1017 if (nbytes_out != NULL) *nbytes_out = bzf->strm.total_out; in BZ_API()
1020 bzCompressEnd ( &(bzf->strm) ); in BZ_API()
1059 bzf->strm.bzalloc = NULL; in BZ_API()
1060 bzf->strm.bzfree = NULL; in BZ_API()
1061 bzf->strm.opaque = NULL; in BZ_API()
1069 ret = bzDecompressInit ( &(bzf->strm), verbosity, small ); in BZ_API()
1073 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1074 bzf->strm.next_in = bzf->buf; in BZ_API()
1094 (void)bzDecompressEnd ( &(bzf->strm) ); in BZ_API()
1120 bzf->strm.avail_out = len; in BZ_API()
1121 bzf->strm.next_out = buf; in BZ_API()
1128 if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { in BZ_API()
1134 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1135 bzf->strm.next_in = bzf->buf; in BZ_API()
1138 ret = bzDecompress ( &(bzf->strm) ); in BZ_API()
1144 bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) in BZ_API()
1149 return len - bzf->strm.avail_out; }; in BZ_API()
1150 if (bzf->strm.avail_out == 0) in BZ_API()
1175 *nUnused = bzf->strm.avail_in; in BZ_API()
1176 *unused = bzf->strm.next_in; in BZ_API()
1195 bz_stream strm; in BZ_API() local
1206 strm.bzalloc = NULL; in BZ_API()
1207 strm.bzfree = NULL; in BZ_API()
1208 strm.opaque = NULL; in BZ_API()
1209 ret = bzCompressInit ( &strm, blockSize100k, in BZ_API()
1213 strm.next_in = source; in BZ_API()
1214 strm.next_out = dest; in BZ_API()
1215 strm.avail_in = sourceLen; in BZ_API()
1216 strm.avail_out = *destLen; in BZ_API()
1218 ret = bzCompress ( &strm, BZ_FINISH ); in BZ_API()
1223 *destLen -= strm.avail_out; in BZ_API()
1224 bzCompressEnd ( &strm ); in BZ_API()
1228 bzCompressEnd ( &strm ); in BZ_API()
1232 bzCompressEnd ( &strm ); in BZ_API()
1246 bz_stream strm; in BZ_API() local
1255 strm.bzalloc = NULL; in BZ_API()
1256 strm.bzfree = NULL; in BZ_API()
1257 strm.opaque = NULL; in BZ_API()
1258 ret = bzDecompressInit ( &strm, verbosity, small ); in BZ_API()
1261 strm.next_in = source; in BZ_API()
1262 strm.next_out = dest; in BZ_API()
1263 strm.avail_in = sourceLen; in BZ_API()
1264 strm.avail_out = *destLen; in BZ_API()
1266 ret = bzDecompress ( &strm ); in BZ_API()
1271 *destLen -= strm.avail_out; in BZ_API()
1272 bzDecompressEnd ( &strm ); in BZ_API()
1276 if (strm.avail_out > 0) { in BZ_API()
1277 bzDecompressEnd ( &strm ); in BZ_API()
1280 bzDecompressEnd ( &strm ); in BZ_API()
1285 bzDecompressEnd ( &strm ); in BZ_API()