File indexing completed on 2025-01-17 09:55:09
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #ifndef _BZLIB_H
0023 #define _BZLIB_H
0024
0025 #ifdef __cplusplus
0026 extern "C" {
0027 #endif
0028
0029 #define BZ_RUN 0
0030 #define BZ_FLUSH 1
0031 #define BZ_FINISH 2
0032
0033 #define BZ_OK 0
0034 #define BZ_RUN_OK 1
0035 #define BZ_FLUSH_OK 2
0036 #define BZ_FINISH_OK 3
0037 #define BZ_STREAM_END 4
0038 #define BZ_SEQUENCE_ERROR (-1)
0039 #define BZ_PARAM_ERROR (-2)
0040 #define BZ_MEM_ERROR (-3)
0041 #define BZ_DATA_ERROR (-4)
0042 #define BZ_DATA_ERROR_MAGIC (-5)
0043 #define BZ_IO_ERROR (-6)
0044 #define BZ_UNEXPECTED_EOF (-7)
0045 #define BZ_OUTBUFF_FULL (-8)
0046 #define BZ_CONFIG_ERROR (-9)
0047
0048 typedef
0049 struct {
0050 char *next_in;
0051 unsigned int avail_in;
0052 unsigned int total_in_lo32;
0053 unsigned int total_in_hi32;
0054
0055 char *next_out;
0056 unsigned int avail_out;
0057 unsigned int total_out_lo32;
0058 unsigned int total_out_hi32;
0059
0060 void *state;
0061
0062 void *(*bzalloc)(void *,int,int);
0063 void (*bzfree)(void *,void *);
0064 void *opaque;
0065 }
0066 bz_stream;
0067
0068
0069 #ifndef BZ_IMPORT
0070 #define BZ_EXPORT
0071 #endif
0072
0073 #ifndef BZ_NO_STDIO
0074
0075 #include <stdio.h>
0076 #endif
0077
0078 #ifdef _WIN32
0079 # include <windows.h>
0080 # ifdef small
0081
0082 # undef small
0083 # endif
0084 # ifdef BZ_EXPORT
0085 # define BZ_API(func) WINAPI func
0086 # define BZ_EXTERN extern
0087 # else
0088
0089 # define BZ_API(func) (WINAPI * func)
0090 # define BZ_EXTERN
0091 # endif
0092 #else
0093 # define BZ_API(func) func
0094 # define BZ_EXTERN extern
0095 #endif
0096
0097
0098
0099
0100 BZ_EXTERN int BZ_API(BZ2_bzCompressInit) (
0101 bz_stream* strm,
0102 int blockSize100k,
0103 int verbosity,
0104 int workFactor
0105 );
0106
0107 BZ_EXTERN int BZ_API(BZ2_bzCompress) (
0108 bz_stream* strm,
0109 int action
0110 );
0111
0112 BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) (
0113 bz_stream* strm
0114 );
0115
0116 BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) (
0117 bz_stream *strm,
0118 int verbosity,
0119 int small
0120 );
0121
0122 BZ_EXTERN int BZ_API(BZ2_bzDecompress) (
0123 bz_stream* strm
0124 );
0125
0126 BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) (
0127 bz_stream *strm
0128 );
0129
0130
0131
0132
0133
0134 #ifndef BZ_NO_STDIO
0135 #define BZ_MAX_UNUSED 5000
0136
0137 typedef void BZFILE;
0138
0139 BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) (
0140 int* bzerror,
0141 FILE* f,
0142 int verbosity,
0143 int small,
0144 void* unused,
0145 int nUnused
0146 );
0147
0148 BZ_EXTERN void BZ_API(BZ2_bzReadClose) (
0149 int* bzerror,
0150 BZFILE* b
0151 );
0152
0153 BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) (
0154 int* bzerror,
0155 BZFILE* b,
0156 void** unused,
0157 int* nUnused
0158 );
0159
0160 BZ_EXTERN int BZ_API(BZ2_bzRead) (
0161 int* bzerror,
0162 BZFILE* b,
0163 void* buf,
0164 int len
0165 );
0166
0167 BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) (
0168 int* bzerror,
0169 FILE* f,
0170 int blockSize100k,
0171 int verbosity,
0172 int workFactor
0173 );
0174
0175 BZ_EXTERN void BZ_API(BZ2_bzWrite) (
0176 int* bzerror,
0177 BZFILE* b,
0178 void* buf,
0179 int len
0180 );
0181
0182 BZ_EXTERN void BZ_API(BZ2_bzWriteClose) (
0183 int* bzerror,
0184 BZFILE* b,
0185 int abandon,
0186 unsigned int* nbytes_in,
0187 unsigned int* nbytes_out
0188 );
0189
0190 BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
0191 int* bzerror,
0192 BZFILE* b,
0193 int abandon,
0194 unsigned int* nbytes_in_lo32,
0195 unsigned int* nbytes_in_hi32,
0196 unsigned int* nbytes_out_lo32,
0197 unsigned int* nbytes_out_hi32
0198 );
0199 #endif
0200
0201
0202
0203
0204 BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) (
0205 char* dest,
0206 unsigned int* destLen,
0207 char* source,
0208 unsigned int sourceLen,
0209 int blockSize100k,
0210 int verbosity,
0211 int workFactor
0212 );
0213
0214 BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) (
0215 char* dest,
0216 unsigned int* destLen,
0217 char* source,
0218 unsigned int sourceLen,
0219 int small,
0220 int verbosity
0221 );
0222
0223
0224
0225
0226
0227
0228
0229
0230
0231
0232
0233 BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) (
0234 void
0235 );
0236
0237 #ifndef BZ_NO_STDIO
0238 BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) (
0239 const char *path,
0240 const char *mode
0241 );
0242
0243 BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) (
0244 int fd,
0245 const char *mode
0246 );
0247
0248 BZ_EXTERN int BZ_API(BZ2_bzread) (
0249 BZFILE* b,
0250 void* buf,
0251 int len
0252 );
0253
0254 BZ_EXTERN int BZ_API(BZ2_bzwrite) (
0255 BZFILE* b,
0256 void* buf,
0257 int len
0258 );
0259
0260 BZ_EXTERN int BZ_API(BZ2_bzflush) (
0261 BZFILE* b
0262 );
0263
0264 BZ_EXTERN void BZ_API(BZ2_bzclose) (
0265 BZFILE* b
0266 );
0267
0268 BZ_EXTERN const char * BZ_API(BZ2_bzerror) (
0269 BZFILE *b,
0270 int *errnum
0271 );
0272 #endif
0273
0274 #ifdef __cplusplus
0275 }
0276 #endif
0277
0278 #endif
0279
0280
0281
0282