gloox
1.0
|
#include <compressiondefault.h>
Public Types | |
enum | Method { MethodZlib = 1, MethodLZW = 2 } |
Public Member Functions | |
CompressionDefault (CompressionDataHandler *cdh, Method method=MethodZlib) | |
virtual | ~CompressionDefault () |
virtual bool | init () |
virtual void | compress (const std::string &data) |
virtual void | decompress (const std::string &data) |
virtual void | cleanup () |
Public Member Functions inherited from CompressionBase | |
CompressionBase (CompressionDataHandler *cdh) | |
virtual | ~CompressionBase () |
Static Public Member Functions | |
static int | types () |
Additional Inherited Members | |
Protected Attributes inherited from CompressionBase | |
CompressionDataHandler * | m_handler |
bool | m_valid |
This is an abstraction of the various Compression implementations.
Definition at line 30 of file compressiondefault.h.
enum Method |
Supported ctypes.
Definition at line 37 of file compressiondefault.h.
CompressionDefault | ( | CompressionDataHandler * | cdh, |
Method | method = MethodZlib |
||
) |
Constructs a new compression wrapper.
cdh | The CompressionDataHandler to handle de/compressed data. |
method | The desired compression method. |
Definition at line 32 of file compressiondefault.cpp.
|
virtual |
Virtual Destructor.
Definition at line 52 of file compressiondefault.cpp.
|
virtual |
Performs internal cleanup.
Implements CompressionBase.
Definition at line 86 of file compressiondefault.cpp.
|
virtual |
Compresses the given chunk of data.
data | The original (uncompressed) data. |
Implements CompressionBase.
Definition at line 74 of file compressiondefault.cpp.
|
virtual |
Decompresses the given chunk of data.
data | The compressed data. |
Implements CompressionBase.
Definition at line 80 of file compressiondefault.cpp.
|
virtual |
This function initializes the compression module. it is mandatory to be called.
Implements CompressionBase.
Definition at line 57 of file compressiondefault.cpp.
|
static |
Returns an int holding the available compression types, ORed.
Definition at line 62 of file compressiondefault.cpp.