aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h285
1 files changed, 285 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h
new file mode 100644
index 0000000..acb1935
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h
@@ -0,0 +1,285 @@
1
2/*-------------------------------------------------------------*/
3/*--- Public header file for the library. ---*/
4/*--- bzlib.h ---*/
5/*-------------------------------------------------------------*/
6
7/* ------------------------------------------------------------------
8 This file is part of bzip2/libbzip2, a program and library for
9 lossless, block-sorting data compression.
10
11 bzip2/libbzip2 version 1.0.6 of 6 September 2010
12 Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
13
14 Please read the WARNING, DISCLAIMER and PATENTS sections in the
15 README file.
16
17 This program is released under the terms of the license contained
18 in the file LICENSE.
19 ------------------------------------------------------------------ */
20
21
22#ifndef _BZLIB_H
23#define _BZLIB_H
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29// we don't need the FILE* interface
30#define BZ_NO_STDIO
31
32#define BZ_RUN 0
33#define BZ_FLUSH 1
34#define BZ_FINISH 2
35
36#define BZ_OK 0
37#define BZ_RUN_OK 1
38#define BZ_FLUSH_OK 2
39#define BZ_FINISH_OK 3
40#define BZ_STREAM_END 4
41#define BZ_SEQUENCE_ERROR (-1)
42#define BZ_PARAM_ERROR (-2)
43#define BZ_MEM_ERROR (-3)
44#define BZ_DATA_ERROR (-4)
45#define BZ_DATA_ERROR_MAGIC (-5)
46#define BZ_IO_ERROR (-6)
47#define BZ_UNEXPECTED_EOF (-7)
48#define BZ_OUTBUFF_FULL (-8)
49#define BZ_CONFIG_ERROR (-9)
50
51typedef
52 struct {
53 char *next_in;
54 unsigned int avail_in;
55 unsigned int total_in_lo32;
56 unsigned int total_in_hi32;
57
58 char *next_out;
59 unsigned int avail_out;
60 unsigned int total_out_lo32;
61 unsigned int total_out_hi32;
62
63 void *state;
64
65 void *(*bzalloc)(void *,int,int);
66 void (*bzfree)(void *,void *);
67 void *opaque;
68 }
69 bz_stream;
70
71
72#ifndef BZ_IMPORT
73#define BZ_EXPORT
74#endif
75
76#ifndef BZ_NO_STDIO
77/* Need a definitition for FILE */
78#include <stdio.h>
79#endif
80
81#ifdef _WIN32
82# include <windows.h>
83# ifdef small
84 /* windows.h define small to char */
85# undef small
86# endif
87# ifdef BZ_EXPORT
88# define BZ_API(func) WINAPI func
89# define BZ_EXTERN extern
90# else
91 /* import windows dll dynamically */
92# define BZ_API(func) (WINAPI * func)
93# define BZ_EXTERN
94# endif
95#else
96# define BZ_API(func) func
97# define BZ_EXTERN extern
98#endif
99
100
101/*-- Core (low-level) library functions --*/
102
103BZ_EXTERN int BZ_API(BZ2_bzCompressInit) (
104 bz_stream* strm,
105 int blockSize100k,
106 int verbosity,
107 int workFactor
108 );
109
110BZ_EXTERN int BZ_API(BZ2_bzCompress) (
111 bz_stream* strm,
112 int action
113 );
114
115BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) (
116 bz_stream* strm
117 );
118
119BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) (
120 bz_stream *strm,
121 int verbosity,
122 int small
123 );
124
125BZ_EXTERN int BZ_API(BZ2_bzDecompress) (
126 bz_stream* strm
127 );
128
129BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) (
130 bz_stream *strm
131 );
132
133
134
135/*-- High(er) level library functions --*/
136
137#ifndef BZ_NO_STDIO
138#define BZ_MAX_UNUSED 5000
139
140typedef void BZFILE;
141
142BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) (
143 int* bzerror,
144 FILE* f,
145 int verbosity,
146 int small,
147 void* unused,
148 int nUnused
149 );
150
151BZ_EXTERN void BZ_API(BZ2_bzReadClose) (
152 int* bzerror,
153 BZFILE* b
154 );
155
156BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) (
157 int* bzerror,
158 BZFILE* b,
159 void** unused,
160 int* nUnused
161 );
162
163BZ_EXTERN int BZ_API(BZ2_bzRead) (
164 int* bzerror,
165 BZFILE* b,
166 void* buf,
167 int len
168 );
169
170BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) (
171 int* bzerror,
172 FILE* f,
173 int blockSize100k,
174 int verbosity,
175 int workFactor
176 );
177
178BZ_EXTERN void BZ_API(BZ2_bzWrite) (
179 int* bzerror,
180 BZFILE* b,
181 void* buf,
182 int len
183 );
184
185BZ_EXTERN void BZ_API(BZ2_bzWriteClose) (
186 int* bzerror,
187 BZFILE* b,
188 int abandon,
189 unsigned int* nbytes_in,
190 unsigned int* nbytes_out
191 );
192
193BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
194 int* bzerror,
195 BZFILE* b,
196 int abandon,
197 unsigned int* nbytes_in_lo32,
198 unsigned int* nbytes_in_hi32,
199 unsigned int* nbytes_out_lo32,
200 unsigned int* nbytes_out_hi32
201 );
202#endif
203
204
205/*-- Utility functions --*/
206
207BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) (
208 char* dest,
209 unsigned int* destLen,
210 char* source,
211 unsigned int sourceLen,
212 int blockSize100k,
213 int verbosity,
214 int workFactor
215 );
216
217BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) (
218 char* dest,
219 unsigned int* destLen,
220 char* source,
221 unsigned int sourceLen,
222 int small,
223 int verbosity
224 );
225
226
227/*--
228 Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp)
229 to support better zlib compatibility.
230 This code is not _officially_ part of libbzip2 (yet);
231 I haven't tested it, documented it, or considered the
232 threading-safeness of it.
233 If this code breaks, please contact both Yoshioka and me.
234--*/
235
236BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) (
237 void
238 );
239
240#ifndef BZ_NO_STDIO
241BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) (
242 const char *path,
243 const char *mode
244 );
245
246BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) (
247 int fd,
248 const char *mode
249 );
250
251BZ_EXTERN int BZ_API(BZ2_bzread) (
252 BZFILE* b,
253 void* buf,
254 int len
255 );
256
257BZ_EXTERN int BZ_API(BZ2_bzwrite) (
258 BZFILE* b,
259 void* buf,
260 int len
261 );
262
263BZ_EXTERN int BZ_API(BZ2_bzflush) (
264 BZFILE* b
265 );
266
267BZ_EXTERN void BZ_API(BZ2_bzclose) (
268 BZFILE* b
269 );
270
271BZ_EXTERN const char * BZ_API(BZ2_bzerror) (
272 BZFILE *b,
273 int *errnum
274 );
275#endif
276
277#ifdef __cplusplus
278}
279#endif
280
281#endif
282
283/*-------------------------------------------------------------*/
284/*--- end bzlib.h ---*/
285/*-------------------------------------------------------------*/