diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-07-03 00:28:59 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-07-03 00:28:59 +0000 |
commit | ac517a2b7625e0aa0862679e961c6349f859ea3b (patch) | |
tree | e3e27a6b9bd5e2be6150088495c91fc91786ad9d /src/bzip2.h | |
parent | f8d4301e9fa4f3709258505941e37fab2eadadc6 (diff) | |
parent | bd865cee5f89116c1f054cd0e5c275e97c2d0a9b (diff) | |
download | libbu++-ac517a2b7625e0aa0862679e961c6349f859ea3b.tar.gz libbu++-ac517a2b7625e0aa0862679e961c6349f859ea3b.tar.bz2 libbu++-ac517a2b7625e0aa0862679e961c6349f859ea3b.tar.xz libbu++-ac517a2b7625e0aa0862679e961c6349f859ea3b.zip |
The reorg is being put in trunk, I think it's ready. Now we just get to find
out how many applications won't work anymore :)
Diffstat (limited to 'src/bzip2.h')
-rw-r--r-- | src/bzip2.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/bzip2.h b/src/bzip2.h new file mode 100644 index 0000000..0a111e8 --- /dev/null +++ b/src/bzip2.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef BU_BZIP2_H | ||
2 | #define BU_BZIP2_H | ||
3 | |||
4 | #include <stdint.h> | ||
5 | #include <bzlib.h> | ||
6 | |||
7 | #include "bu/filter.h" | ||
8 | |||
9 | namespace Bu | ||
10 | { | ||
11 | /** | ||
12 | * | ||
13 | */ | ||
14 | class BZip2 : public Bu::Filter | ||
15 | { | ||
16 | public: | ||
17 | BZip2( Bu::Stream &rNext, int nCompression=9 ); | ||
18 | virtual ~BZip2(); | ||
19 | |||
20 | virtual void start(); | ||
21 | virtual size_t stop(); | ||
22 | virtual size_t read( void *pBuf, size_t nBytes ); | ||
23 | virtual size_t write( const void *pBuf, size_t nBytes ); | ||
24 | |||
25 | virtual bool isOpen(); | ||
26 | |||
27 | private: | ||
28 | void bzError( int code ); | ||
29 | bz_stream bzState; | ||
30 | bool bReading; | ||
31 | int nCompression; | ||
32 | char *pBuf; | ||
33 | uint32_t nBufSize; | ||
34 | }; | ||
35 | } | ||
36 | |||
37 | #endif | ||