compressor_t Class Reference

Compression implementation class. More...

#include <compressor.hh>

List of all members.

Public Member Functions

void clear ()
 Clears data structures initialized inside compressor.
bool compress (state_t, char *&pointer, int &size)
 Compress a state according current compression method.
bool compress_without_alloc (state_t, char *&pointer, int &size)
 Compress a state according current compression method, but returned pointer points to an internal buffer of compressor_t.
 compressor_t ()
 A constructor.
bool decompress (state_t &, char *pointer, int size)
 Decompress the state using current compression method.
bool init (int method, int appendix_size)
 Initializes compressor instance.
 ~compressor_t ()
 A destructor.


Detailed Description

Compression implementation class.

Member Function Documentation

void clear (  ) 

Clears data structures initialized inside compressor.

Dealocates data that are created during initialization of compressor. This is needed especially for clearing the arena of compressor.

Referenced by explicit_storage_t::init().

bool compress ( state_t  ,
char *&  pointer,
int &  size 
)

Compress a state according current compression method.

Returns where the state is compressed and how long the compressed representation is.

Referenced by explicit_storage_t::insert(), and explicit_storage_t::is_stored_if_not_insert().

bool compress_without_alloc ( state_t  ,
char *&  pointer,
int &  size 
)

Compress a state according current compression method, but returned pointer points to an internal buffer of compressor_t.

Works the same way as compressor_t::compress(), but compressed state is stored internally in compressor_t, thus it does not need to be deleted

Referenced by explicit_storage_t::is_stored().

bool decompress ( state_t ,
char *  pointer,
int  size 
)

Decompress the state using current compression method.

Decompress the state from the given pointer and size using current compression method.

Referenced by explicit_storage_t::reconstruct().

bool init ( int  method,
int  appendix_size 
)

Initializes compressor instance.

Requires identification of compression method, extra space that should be allocated at each compressed state (appendix) and pointer to explicit_system_t.

Referenced by explicit_storage_t::init().


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

Reference Manual for Library, 2006 developed in ParaDiSe laboratory, Faculty of Informatics, Masaryk University