#include <XPCompression.h>
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) |
| XPCompression | ( | ) |
The ctor performs some basic initialisation
| virtual ~XPCompression | ( | ) | [virtual] |
The dtor makes sure everything is tidy
| int CalculateMaximumMemory | ( | int | size | ) |
Given an input size calculate the maximum absolute worse case for the compressed output
| size | the size of the data |
| bool Compress | ( | void * | source_data, | |
| int | source_length, | |||
| void * | destination_data, | |||
| int * | destination_length, | |||
| int | level = 10 | |||
| ) |
Compress a block of memory
| 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 |
| bool Decompress | ( | void * | source_data, | |
| int | source_length, | |||
| void * | destination_data, | |||
| int * | destination_length | |||
| ) |
Decompress a block of memory
| 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 |
1.5.3