Base class for backends for different compression formats. 更多...
#include <Compressor.h>
Public 成员函数 | |
| virtual | ~Compressor () |
| virtual char * | compress (std::string format, const char *data, size_t dataSize, int level, size_t &compressedSize)=0 |
| Compresses input data, and returns the compressed result. | |
| virtual char * | decompress (std::string format, const char *data, size_t dataSize, size_t &decompressedSize)=0 |
| Decompresses compressed data, and returns the decompressed result. | |
| virtual bool | isSupported (std::string format) const =0 |
| Gets whether a specific format is supported by this backend. | |
静态 Public 成员函数 | |
| static Compressor * | getCompressor (std::string format) |
| Gets a Compressor that can compress and decompress a specific format. Returns null if there are no supported compressors for the given format. Available formats are: | |
Protected 成员函数 | |
| Compressor () | |
详细描述
Base class for backends for different compression formats.
在文件 Compressor.h 第 13 行定义.
构造及析构函数说明
◆ ~Compressor()
|
inlinevirtual |
在文件 Compressor.h 第 28 行定义.
◆ Compressor()
|
inlineprotected |
在文件 Compressor.h 第 66 行定义.
成员函数说明
◆ compress()
|
pure virtual |
Compresses input data, and returns the compressed result.
- 参数
-
[in] format The format to compress to. [in] data The input (uncompressed) data. [in] dataSize The size in bytes of the input data. [in] level The amount of compression to apply (between 0 and 9.) A value of -1 indicates the default amount of compression. Specific formats may not use every level. [out] compressedSize The size in bytes of the compressed result.
- 返回
- The newly compressed data (allocated with new[]).
在 eve::data::LZ4Compressor , 以及 eve::data::zlibCompressor 内被实现.
被这些函数引用 eve::data::compress().
◆ decompress()
|
pure virtual |
Decompresses compressed data, and returns the decompressed result.
- 参数
-
[in] format The format the compressed data is in. [in] data The input (compressed) data. [in] dataSize The size in bytes of the compressed data. [in,out] decompressedSize On input, the size in bytes of the original uncompressed data, or 0 if unknown. On return, the size in bytes of the decompressed data.
- 返回
- The decompressed data (allocated with new[]).
在 eve::data::LZ4Compressor , 以及 eve::data::zlibCompressor 内被实现.
被这些函数引用 eve::data::decompress().
◆ getCompressor()
|
static |
Gets a Compressor that can compress and decompress a specific format. Returns null if there are no supported compressors for the given format. Available formats are:
- "lz4"
- "zlib"
- "gzip"
- "deflate"
在文件 Compressor.cpp 第 342 行定义.
引用了 c.
被这些函数引用 eve::data::compress() , 以及 eve::data::decompress().
◆ isSupported()
|
pure virtual |
Gets whether a specific format is supported by this backend.
在 eve::data::LZ4Compressor , 以及 eve::data::zlibCompressor 内被实现.
该类的文档由以下文件生成:
- src/modules/data/Compressor.h
- src/modules/data/Compressor.cpp