diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-11-05 22:41:51 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-11-05 22:41:51 +0000 |
commit | ec05778d5718a7912e506764d443a78d6a6179e3 (patch) | |
tree | 78a9a01532180030c095acefc45763f07c14edb8 /src/stable/deflate.h | |
parent | b20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff) | |
download | libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.gz libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.bz2 libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.xz libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.zip |
Converted tabs to spaces with tabconv.
Diffstat (limited to 'src/stable/deflate.h')
-rw-r--r-- | src/stable/deflate.h | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/stable/deflate.h b/src/stable/deflate.h index 114b173..2ccd53f 100644 --- a/src/stable/deflate.h +++ b/src/stable/deflate.h | |||
@@ -14,53 +14,53 @@ | |||
14 | 14 | ||
15 | namespace Bu | 15 | namespace Bu |
16 | { | 16 | { |
17 | /** | 17 | /** |
18 | * Provides Deflate (LZ77) support via zlib. This provides zlib, raw, and | 18 | * Provides Deflate (LZ77) support via zlib. This provides zlib, raw, and |
19 | * gzip stream types. By default it will autodetect the input type and | 19 | * gzip stream types. By default it will autodetect the input type and |
20 | * encode into a raw deflate stream. | 20 | * encode into a raw deflate stream. |
21 | * | 21 | * |
22 | *@ingroup Streams | 22 | *@ingroup Streams |
23 | *@ingroup Compression | 23 | *@ingroup Compression |
24 | */ | 24 | */ |
25 | class Deflate : public Bu::Filter | 25 | class Deflate : public Bu::Filter |
26 | { | 26 | { |
27 | public: | 27 | public: |
28 | enum Format | 28 | enum Format |
29 | { | 29 | { |
30 | Raw = 0x01, | 30 | Raw = 0x01, |
31 | Zlib = 0x02, | 31 | Zlib = 0x02, |
32 | Gzip = 0x03, | 32 | Gzip = 0x03, |
33 | AutoDetect = 0x04, | 33 | AutoDetect = 0x04, |
34 | 34 | ||
35 | AutoRaw = 0x04|0x01, | 35 | AutoRaw = 0x04|0x01, |
36 | AutoZlib = 0x04|0x02, | 36 | AutoZlib = 0x04|0x02, |
37 | AutoGzip = 0x04|0x03 | 37 | AutoGzip = 0x04|0x03 |
38 | }; | 38 | }; |
39 | 39 | ||
40 | Deflate( Bu::Stream &rNext, int nCompression=-1, Format eFmt=AutoZlib ); | 40 | Deflate( Bu::Stream &rNext, int nCompression=-1, Format eFmt=AutoZlib ); |
41 | virtual ~Deflate(); | 41 | virtual ~Deflate(); |
42 | 42 | ||
43 | virtual void start(); | 43 | virtual void start(); |
44 | virtual Bu::size stop(); | 44 | virtual Bu::size stop(); |
45 | virtual Bu::size read( void *pBuf, Bu::size nBytes ); | 45 | virtual Bu::size read( void *pBuf, Bu::size nBytes ); |
46 | virtual Bu::size write( const void *pBuf, Bu::size nBytes ); | 46 | virtual Bu::size write( const void *pBuf, Bu::size nBytes ); |
47 | 47 | ||
48 | virtual bool isOpen(); | 48 | virtual bool isOpen(); |
49 | virtual bool isEos(); | 49 | virtual bool isEos(); |
50 | 50 | ||
51 | Bu::size getCompressedSize(); | 51 | Bu::size getCompressedSize(); |
52 | 52 | ||
53 | private: | 53 | private: |
54 | void zError( int code ); | 54 | void zError( int code ); |
55 | void *prState; | 55 | void *prState; |
56 | bool bReading; | 56 | bool bReading; |
57 | int nCompression; | 57 | int nCompression; |
58 | char *pBuf; | 58 | char *pBuf; |
59 | uint32_t nBufSize; | 59 | uint32_t nBufSize; |
60 | Bu::size sTotalOut; | 60 | Bu::size sTotalOut; |
61 | Format eFmt; | 61 | Format eFmt; |
62 | bool bEos; | 62 | bool bEos; |
63 | }; | 63 | }; |
64 | } | 64 | } |
65 | 65 | ||
66 | #endif | 66 | #endif |