Ocean
Ocean::IO::Compression Class Reference

This class implements individual compression algorithms. More...

Public Types

typedef std::vector< uint8_t > Buffer
 Definition of a vector holding bytes. More...
 

Static Public Member Functions

static bool gzipCompress (const void *buffer, const size_t bufferSize, Buffer &compressedBuffer)
 Compresses a buffer with gzip. More...
 
static bool gzipDecompress (const void *compressedBuffer, const size_t compressedBufferSize, Buffer &uncompressedBuffer)
 Decompresses a buffer which has been compressed with gzip. More...
 

Detailed Description

This class implements individual compression algorithms.

Member Typedef Documentation

◆ Buffer

typedef std::vector<uint8_t> Ocean::IO::Compression::Buffer

Definition of a vector holding bytes.

Member Function Documentation

◆ gzipCompress()

static bool Ocean::IO::Compression::gzipCompress ( const void *  buffer,
const size_t  bufferSize,
Buffer compressedBuffer 
)
static

Compresses a buffer with gzip.

Parameters
bufferThe buffer to compress
bufferSizeThe size of the buffer, in bytes
compressedBufferThe compressed buffer
Returns
True, if succeeded

◆ gzipDecompress()

static bool Ocean::IO::Compression::gzipDecompress ( const void *  compressedBuffer,
const size_t  compressedBufferSize,
Buffer uncompressedBuffer 
)
static

Decompresses a buffer which has been compressed with gzip.

Parameters
compressedBufferThe compressed buffer
compressedBufferSizeThe size of the uncompressed buffer, in bytes
uncompressedBufferThe uncompressed buffer
Returns
True, if succeeded

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