WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
BZlib.h
1#ifndef _WINC_BZLIB
2#define _WINC_BZLIB
3
4#include <bzlib.h>
5
6#include <WXP/Buffer.h>
7
8namespace WXP {
9 class BZlib {
10 int type;
11 bool setup;
12 bz_stream bz;
13 int stat;
14
15 public:
16 BZlib();
17 BZlib( int rtype );
18 int init();
19 int setIn( unsigned char *next_in, int avail_in );
20 int setOut( unsigned char *next_out, int avail_out );
21 int decomp();
22 int decomp( Buffer &in, Buffer &out );
23 int comp( int flag );
24 int finish();
25 int print();
26
27 inline int getStatus(){ return stat; };
28 inline int getAvailIn(){ return bz.avail_in; };
29 inline int getAvailOut(){ return bz.avail_out; };
30 inline int getTotalOut(){ return bz.total_out_lo32; };
31 inline bool isError(){ return stat < 0 ? true : false; };
32
33 static int const STREAM_END = BZ_STREAM_END;
34 static int const OK = BZ_OK;
35
36 enum {
38 DECOMP
39 };
40 };
41}
42#endif
This class manages bzip2 decompression.
Definition BZlib.h:9
int init()
Definition BZlib.cc:35
BZlib()
Definition BZlib.cc:20
@ COMP
Definition BZlib.h:37
@ DECOMP
Definition BZlib.h:38
This class creates a generic buffer for data.
Definition Buffer.h:5
All WXP classes fall under the WXP namespace.
Definition Angle.h:4