Lines Matching refs:bzf

919    if (bzf != NULL) bzf->lastErr = eee;   \
954 bzFile* bzf = NULL; in BZ_API() local
967 bzf = malloc ( sizeof(bzFile) ); in BZ_API()
968 if (bzf == NULL) in BZ_API()
972 bzf->initialisedOk = False; in BZ_API()
973 bzf->bufN = 0; in BZ_API()
974 bzf->handle = f; in BZ_API()
975 bzf->writing = True; in BZ_API()
976 bzf->strm.bzalloc = NULL; in BZ_API()
977 bzf->strm.bzfree = NULL; in BZ_API()
978 bzf->strm.opaque = NULL; in BZ_API()
981 ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, in BZ_API()
984 { BZ_SETERR(ret); free(bzf); return NULL; }; in BZ_API()
986 bzf->strm.avail_in = 0; in BZ_API()
987 bzf->initialisedOk = True; in BZ_API()
988 return bzf; in BZ_API()
1000 bzFile* bzf = (bzFile*)b; in BZ_API() local
1003 if (bzf == NULL || buf == NULL || len < 0) in BZ_API()
1005 if (!(bzf->writing)) in BZ_API()
1007 if (ferror(bzf->handle)) in BZ_API()
1013 bzf->strm.avail_in = len; in BZ_API()
1014 bzf->strm.next_in = buf; in BZ_API()
1017 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1018 bzf->strm.next_out = bzf->buf; in BZ_API()
1019 ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN ); in BZ_API()
1023 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1024 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1025 n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), in BZ_API()
1026 n, bzf->handle ); in BZ_API()
1027 if (n != n2 || ferror(bzf->handle)) in BZ_API()
1031 if (bzf->strm.avail_in == 0) in BZ_API()
1060 bzFile* bzf = (bzFile*)b; in BZ_API() local
1062 if (bzf == NULL) in BZ_API()
1064 if (!(bzf->writing)) in BZ_API()
1066 if (ferror(bzf->handle)) in BZ_API()
1074 if ((!abandon) && bzf->lastErr == BZ_OK) { in BZ_API()
1076 bzf->strm.avail_out = BZ_MAX_UNUSED; in BZ_API()
1077 bzf->strm.next_out = bzf->buf; in BZ_API()
1078 ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH ); in BZ_API()
1082 if (bzf->strm.avail_out < BZ_MAX_UNUSED) { in BZ_API()
1083 n = BZ_MAX_UNUSED - bzf->strm.avail_out; in BZ_API()
1084 n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), in BZ_API()
1085 n, bzf->handle ); in BZ_API()
1086 if (n != n2 || ferror(bzf->handle)) in BZ_API()
1094 if ( !abandon && !ferror ( bzf->handle ) ) { in BZ_API()
1095 fflush ( bzf->handle ); in BZ_API()
1096 if (ferror(bzf->handle)) in BZ_API()
1101 *nbytes_in_lo32 = bzf->strm.total_in_lo32; in BZ_API()
1103 *nbytes_in_hi32 = bzf->strm.total_in_hi32; in BZ_API()
1105 *nbytes_out_lo32 = bzf->strm.total_out_lo32; in BZ_API()
1107 *nbytes_out_hi32 = bzf->strm.total_out_hi32; in BZ_API()
1110 BZ2_bzCompressEnd ( &(bzf->strm) ); in BZ_API()
1111 free ( bzf ); in BZ_API()
1124 bzFile* bzf = NULL; in BZ_API() local
1139 bzf = malloc ( sizeof(bzFile) ); in BZ_API()
1140 if (bzf == NULL) in BZ_API()
1145 bzf->initialisedOk = False; in BZ_API()
1146 bzf->handle = f; in BZ_API()
1147 bzf->bufN = 0; in BZ_API()
1148 bzf->writing = False; in BZ_API()
1149 bzf->strm.bzalloc = NULL; in BZ_API()
1150 bzf->strm.bzfree = NULL; in BZ_API()
1151 bzf->strm.opaque = NULL; in BZ_API()
1154 bzf->buf[bzf->bufN] = *((UChar*)(unused)); bzf->bufN++; in BZ_API()
1159 ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small ); in BZ_API()
1161 { BZ_SETERR(ret); free(bzf); return NULL; }; in BZ_API()
1163 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1164 bzf->strm.next_in = bzf->buf; in BZ_API()
1166 bzf->initialisedOk = True; in BZ_API()
1167 return bzf; in BZ_API()
1174 bzFile* bzf = (bzFile*)b; in BZ_API() local
1177 if (bzf == NULL) in BZ_API()
1180 if (bzf->writing) in BZ_API()
1183 if (bzf->initialisedOk) in BZ_API()
1184 (void)BZ2_bzDecompressEnd ( &(bzf->strm) ); in BZ_API()
1185 free ( bzf ); in BZ_API()
1197 bzFile* bzf = (bzFile*)b; in BZ_API() local
1201 if (bzf == NULL || buf == NULL || len < 0) in BZ_API()
1204 if (bzf->writing) in BZ_API()
1210 bzf->strm.avail_out = len; in BZ_API()
1211 bzf->strm.next_out = buf; in BZ_API()
1215 if (ferror(bzf->handle)) in BZ_API()
1218 if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { in BZ_API()
1219 n = fread ( bzf->buf, sizeof(UChar), in BZ_API()
1220 BZ_MAX_UNUSED, bzf->handle ); in BZ_API()
1221 if (ferror(bzf->handle)) in BZ_API()
1223 bzf->bufN = n; in BZ_API()
1224 bzf->strm.avail_in = bzf->bufN; in BZ_API()
1225 bzf->strm.next_in = bzf->buf; in BZ_API()
1228 ret = BZ2_bzDecompress ( &(bzf->strm) ); in BZ_API()
1233 if (ret == BZ_OK && myfeof(bzf->handle) && in BZ_API()
1234 bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) in BZ_API()
1239 return len - bzf->strm.avail_out; }; in BZ_API()
1240 if (bzf->strm.avail_out == 0) in BZ_API()
1256 bzFile* bzf = (bzFile*)b; in BZ_API() local
1257 if (bzf == NULL) in BZ_API()
1259 if (bzf->lastErr != BZ_STREAM_END) in BZ_API()
1265 *nUnused = bzf->strm.avail_in; in BZ_API()
1266 *unused = bzf->strm.next_in; in BZ_API()