#include <Compressor.hpp>
Public Member Functions | |
bool | Compress (const char *Source, std::size_t Size, unsigned int Level=9) |
Compress the specified data. | |
bool | Uncompress (const char *Source, std::size_t Size, std::size_t UncompressedSize) |
Uncompress the specified data. | |
const char * | GetData () const |
Get the data after compression or decompression (size is given by GetDataSize()). | |
std::size_t | GetDataSize () const |
Tell the size of the compressed / uncompressed data (data is given by GetData()). |
Definition at line 39 of file Compressor.hpp.
bool sfCompressor::Compress | ( | const char * | Source, | |
std::size_t | Size, | |||
unsigned int | Level = 9 | |||
) |
Compress the specified data.
Source | : Pointer to the data to compress | |
Size | : Size of the data to compress (in bytes) | |
Level | : Level of compression (between 0 and 9 : 0 means no compression, 9 means best compression) (9 by default) |
Definition at line 36 of file Compressor.cpp.
bool sfCompressor::Uncompress | ( | const char * | Source, | |
std::size_t | Size, | |||
std::size_t | UncompressedSize | |||
) |
Uncompress the specified data.
Source | : Pointer to the data to uncompress | |
Size | : Size of the data to uncompress (in bytes) | |
UncompressedSize | : Size of the uncompressed data ; you have to provide it as the algorithm cannot compute it before decompression |
Definition at line 80 of file Compressor.cpp.
const char * sfCompressor::GetData | ( | ) | const |
Get the data after compression or decompression (size is given by GetDataSize()).
This pointer is valid until the next call to Compress or Uncompress
Definition at line 122 of file Compressor.cpp.
std::size_t sfCompressor::GetDataSize | ( | ) | const |
Tell the size of the compressed / uncompressed data (data is given by GetData()).
Definition at line 132 of file Compressor.cpp.