Marine Library  1.0
C++ library for Linux Networking Development
List of all members
CCompressorSnappy Class Reference

A convenient interface for Snappy compression algorithm. More...

#include <compress_snappy.hh>

Public Member Functions

Compression

Compress given data.

If output is not empty, the result will append to output.

Parameters
[in]inputData to be compressed
[out]outputA buffer to receive the result
Returns
true if succeeded; otherwise false
bool compress (const std::vector< char > &input, std::vector< char > &output) const
 
bool compress (const std::vector< signed char > &input, std::vector< signed char > &output) const
 
bool compress (const std::vector< unsigned char > &input, std::vector< unsigned char > &output) const
 
bool compress (const std::string &input, std::string &output) const
 
Decompression

Decompress given data.

If output is not empty, the result will append to output.

Parameters
[in]inputData to be decompressed
[out]outputA buffer to receive the result
Returns
true if succeeded; otherwise false
bool decompress (const std::vector< char > &input, std::vector< char > &output) const
 
bool decompress (const std::vector< signed char > &input, std::vector< signed char > &output) const
 
bool decompress (const std::vector< unsigned char > &input, std::vector< unsigned char > &output) const
 
bool decompress (const std::string &input, std::string &output) const
 

Detailed Description

A convenient interface for Snappy compression algorithm.

You may need to link to Snappy library (e.g. -lsnappy) if you use CCompressorSnappy.


The documentation for this class was generated from the following file: