#include <Compressor.hpp>
Public Member Functions | |
bool | Compress (const char *Source, std::size_t Size, unsigned int Level=9) |
bool | Uncompress (const char *Source, std::size_t Size, std::size_t UncompressedSize) |
const char * | GetData () const |
std::size_t | GetDataSize () const |
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.
References GetData().
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.
References GetData().
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.
Referenced by Compress(), and Uncompress().
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.