CompressionBase Class Referenceabstract

`#include <compressionbase.h>`

Inheritance diagram for CompressionBase:
[legend]

## Public Member Functions

| CompressionBase (CompressionDataHandler *cdh)
virtual | ~CompressionBase ()
virtual bool | init ()=0
virtual void | compress (const std::string &data)=0
virtual void | decompress (const std::string &data)=0
virtual void | cleanup ()=0

## Protected Attributes

CompressionDataHandler * | m_handler
bool | m_valid

## Detailed Description

This is an abstract base class for stream compression implementations.

You should not need to use this class directly.

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

Since
  0.9

Definition at line 34 of file compressionbase.h.

## Constructor & Destructor Documentation

## CompressionBase()

CompressionBase | ( | CompressionDataHandler * | cdh | ) |

inline

Contructor.

Parameters

  cdh | A CompressionDataHandler-derived object that will be notified about finished de/compression.

Definition at line 42 of file compressionbase.h.

## ~CompressionBase()

virtual ~CompressionBase | ( |  | ) |

inline virtual

Virtual Destructor.

Definition at line 47 of file compressionbase.h.

## Member Function Documentation

## cleanup()

virtual void cleanup | ( |  | ) |

pure virtual

Performs internal cleanup.

Since
  1.0

Implemented in CompressionDefault, and CompressionZlib.

## compress()

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

pure virtual

Compresses the given chunk of data.

Parameters

  data | The original (uncompressed) data.

Implemented in CompressionDefault, and CompressionZlib.

## decompress()

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

pure virtual

Decompresses the given chunk of data.

Parameters

  data | The compressed data.

Implemented in CompressionDefault, and CompressionZlib.

## init()

virtual bool init | ( |  | ) |

pure virtual

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

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

Implemented in CompressionDefault, and CompressionZlib.

## Member Data Documentation

## m_handler

CompressionDataHandler* m_handler

protected

A handler for compressed/uncompressed data.

Definition at line 76 of file compressionbase.h.

## m_valid

bool m_valid

protected

Whether the compression module can be used.

Definition at line 79 of file compressionbase.h.

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

- compressionbase.h