公有成员 | 保护属性

CCompressor类参考


详细描述

Compression library for compressing and decompressing buffers using one of the standard compression algorithms, LZO, GZIP, BZIP2 or LZMA.

The general recommendation is to use LZO whenever lightweight compression is sufficient but high i/o throughputs are needed (at 1/2 the speed of memcpy).

If size is all that matters use LZMA (which especially when compressing can be very slow though).

Note that besides lzo compression, this library is thread safe.

在文件Compressor.h47行定义。

继承图,类CCompressor
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CCompressor (E_COMPRESSION_TYPE ct)
virtual ~CCompressor ()
void compress (uint8_t *uncompressed, uint64_t uncompressed_size, uint8_t *&compressed, uint64_t &compressed_size, int32_t level=1)
void decompress (uint8_t *compressed, uint64_t compressed_size, uint8_t *uncompressed, uint64_t &uncompressed_size)
virtual const char * get_name () const

保护属性

E_COMPRESSION_TYPE compression_type

构造及析构函数文档

default constructor

参数:
ct compression to use: one of UNCOMPRESSED, LZO, GZIP, BZIP2 or LZMA

在文件Compressor.h55行定义。

virtual ~CCompressor (  )  [virtual]

default destructor

在文件Compressor.h60行定义。


成员函数文档

void compress ( uint8_t *  uncompressed,
uint64_t  uncompressed_size,
uint8_t *&  compressed,
uint64_t &  compressed_size,
int32_t  level = 1 
)

compress data

compresses the buffer uncompressed using the selected compression algorithm and returns compressed data and its size

参数:
uncompressed - uncompressed data to be compressed
uncompressed_size - size of the uncompressed data
compressed - pointer to hold compressed data (returned)
compressed_size - size of compressed data (returned)
level - compression level between 1 and 9

在文件Compressor.cpp34行定义。

void decompress ( uint8_t *  compressed,
uint64_t  compressed_size,
uint8_t *  uncompressed,
uint64_t &  uncompressed_size 
)

decompress data

Decompresses the buffer using the selected compression algorithm to the memory block specified in uncompressed. Note: Compressed and uncompressed size must be known prior to calling this function.

参数:
compressed - pointer to compressed data
compressed_size - size of compressed data
uncompressed - pointer to buffer to hold uncompressed data
uncompressed_size - size of the uncompressed data

在文件Compressor.cpp189行定义。

virtual const char* get_name (  )  const [virtual]
返回:
object name

实现了CSGObject

在文件Compressor.h94行定义。


成员数据文档

compressor type

在文件Compressor.h98行定义。


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

SHOGUN Machine Learning Toolbox - Documentation