gloox  1.0.28
Public Types | Public Member Functions | Static Public Member Functions | List of all members
CompressionDefault Class Reference

#include <compressiondefault.h>

Inheritance diagram for CompressionDefault:
Inheritance graph
[legend]

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
CompressionDataHandlerm_handler
 
bool m_valid
 

Detailed Description

This is an abstraction of the various Compression implementations.

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
1.0

Definition at line 30 of file compressiondefault.h.

Member Enumeration Documentation

◆ Method

enum Method

Supported ctypes.

Enumerator
MethodZlib 

Zlib compression.

MethodLZW 

LZW compression.

Definition at line 37 of file compressiondefault.h.

Constructor & Destructor Documentation

◆ CompressionDefault()

Constructs a new compression wrapper.

Parameters
cdhThe CompressionDataHandler to handle de/compressed data.
methodThe desired compression method.

Definition at line 32 of file compressiondefault.cpp.

◆ ~CompressionDefault()

~CompressionDefault ( )
virtual

Virtual Destructor.

Definition at line 52 of file compressiondefault.cpp.

Member Function Documentation

◆ cleanup()

void cleanup ( )
virtual

Performs internal cleanup.

Since
1.0

Implements CompressionBase.

Definition at line 86 of file compressiondefault.cpp.

◆ compress()

void compress ( const std::string &  data)
virtual

Compresses the given chunk of data.

Parameters
dataThe original (uncompressed) data.

Implements CompressionBase.

Definition at line 74 of file compressiondefault.cpp.

◆ decompress()

void decompress ( const std::string &  data)
virtual

Decompresses the given chunk of data.

Parameters
dataThe compressed data.

Implements CompressionBase.

Definition at line 80 of file compressiondefault.cpp.

◆ init()

bool init ( )
virtual

This function initializes the compression module. it is mandatory to be called.

Returns
True if the module was initialized successfully, false otherwise.

Implements CompressionBase.

Definition at line 57 of file compressiondefault.cpp.

◆ types()

int types ( )
static

Returns an int holding the available compression types, ORed.

Returns
An int holding the available compression types, ORed.

Definition at line 62 of file compressiondefault.cpp.


The documentation for this class was generated from the following files: