Main Page | Class List | Directories | File List | Class Members

RNReplicaNet::XPCompression Class Reference

#include <XPCompression.h>

List of all members.

Public Member Functions

 XPCompression ()
virtual ~XPCompression ()
int CalculateMaximumMemory (int size)
bool Compress (void *source_data, int source_length, void *destination_data, int *destination_length, int level=10)
bool Decompress (void *source_data, int source_length, void *destination_data, int *destination_length)


Detailed Description

A general purpose lossless compression and decompression class


Constructor & Destructor Documentation

RNReplicaNet::XPCompression::XPCompression  ) 
 

The ctor performs some basic initialisation

virtual RNReplicaNet::XPCompression::~XPCompression  )  [virtual]
 

The dtor makes sure everything is tidy


Member Function Documentation

int RNReplicaNet::XPCompression::CalculateMaximumMemory int  size  ) 
 

Given an input size calculate the maximum absolute worse case for the compressed output

Parameters:
size the size of the data
Returns:
the worse case output length

bool RNReplicaNet::XPCompression::Compress void *  source_data,
int  source_length,
void *  destination_data,
int *  destination_length,
int  level = 10
 

Compress a block of memory

Parameters:
source_data the source data
source_length the source data length in bytes
destination_data the destination data
destination_length the pointer to the destination data length in bytes to fill in
level the compression level to use. 1 is fast and 10 is best but slower. The default for this parameter is 10
Returns:
true is no error else false for an error

bool RNReplicaNet::XPCompression::Decompress void *  source_data,
int  source_length,
void *  destination_data,
int *  destination_length
 

Decompress a block of memory

Parameters:
source_data the source data
source_length the source data length in bytes
destination_data the destination data
destination_length the pointer to the destination data length in bytes to fill in
Returns:
true is no error else false for an error


The documentation for this class was generated from the following file:
Generated on Sun Oct 30 01:12:28 2005 for XPCompression by  doxygen 1.4.1