载入中...
搜索中...
未找到

Base class for backends for different compression formats. 更多...

#include <Compressor.h>

类 eve::data::Compressor 继承关系图:
eve::data::LZ4Compressor eve::data::zlibCompressor

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 CompressorgetCompressor (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.h13 行定义.

构造及析构函数说明

◆ ~Compressor()

virtual eve::data::Compressor::~Compressor ( )
inlinevirtual

在文件 Compressor.h28 行定义.

◆ Compressor()

eve::data::Compressor::Compressor ( )
inlineprotected

在文件 Compressor.h66 行定义.

成员函数说明

◆ compress()

virtual char * eve::data::Compressor::compress ( std::string  format,
const char *  data,
size_t  dataSize,
int  level,
size_t &  compressedSize 
)
pure virtual

Compresses input data, and returns the compressed result.

参数
[in]formatThe format to compress to.
[in]dataThe input (uncompressed) data.
[in]dataSizeThe size in bytes of the input data.
[in]levelThe 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]compressedSizeThe size in bytes of the compressed result.
返回
The newly compressed data (allocated with new[]).

eve::data::LZ4Compressor , 以及 eve::data::zlibCompressor 内被实现.

被这些函数引用 eve::data::compress().

◆ decompress()

virtual char * eve::data::Compressor::decompress ( std::string  format,
const char *  data,
size_t  dataSize,
size_t &  decompressedSize 
)
pure virtual

Decompresses compressed data, and returns the decompressed result.

参数
[in]formatThe format the compressed data is in.
[in]dataThe input (compressed) data.
[in]dataSizeThe size in bytes of the compressed data.
[in,out]decompressedSizeOn 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()

Compressor * eve::data::Compressor::getCompressor ( std::string  format)
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.cpp342 行定义.

引用了 c.

被这些函数引用 eve::data::compress() , 以及 eve::data::decompress().

◆ isSupported()

virtual bool eve::data::Compressor::isSupported ( std::string  format) const
pure virtual

Gets whether a specific format is supported by this backend.

eve::data::LZ4Compressor , 以及 eve::data::zlibCompressor 内被实现.


该类的文档由以下文件生成: