MADARA  3.4.1
madara::filters::LZ4BufferFilter Class Reference

Compresses with LZ4. More...

#include <LZ4BufferFilter.h>

Inheritance diagram for madara::filters::LZ4BufferFilter:
madara::filters::BufferFilter

Public Member Functions

virtual ~LZ4BufferFilter ()=default
 Destructor. More...
 
virtual int decode (char *source, int size, int max_size) const
 Decodes the buffer in place using LZ4 decompression. More...
 
virtual int encode (char *source, int size, int max_size) const
 Encodes the buffer in place using LZ4 compression. More...
 
virtual std::string get_id (void)
 Gets the id of the filter. More...
 
virtual uint32_t get_version (void)
 Gets the version of the filter. More...
 

Public Attributes

int buffer_size = 10000000
 the size of the decompress buffer (max size) More...
 

Detailed Description

Compresses with LZ4.

Definition at line 27 of file LZ4BufferFilter.h.

Constructor & Destructor Documentation

◆ ~LZ4BufferFilter()

virtual madara::filters::LZ4BufferFilter::~LZ4BufferFilter ( )
virtualdefault

Destructor.

Member Function Documentation

◆ decode()

int madara::filters::LZ4BufferFilter::decode ( char *  source,
int  size,
int  max_size 
) const
virtual

Decodes the buffer in place using LZ4 decompression.

Parameters
sourcethe source and destination buffer
sizethe amount of data in the buffer in bytes
max_sizethe amount of bytes the buffer can hold
Returns
the new size after decoding

Implements madara::filters::BufferFilter.

Definition at line 32 of file LZ4BufferFilter.cpp.

◆ encode()

int madara::filters::LZ4BufferFilter::encode ( char *  source,
int  size,
int  max_size 
) const
virtual

Encodes the buffer in place using LZ4 compression.

Parameters
sourcethe source and destination buffer
sizethe amount of data in the buffer in bytes
max_sizethe amount of bytes the buffer can hold
Returns
the new size after encoding

Implements madara::filters::BufferFilter.

Definition at line 10 of file LZ4BufferFilter.cpp.

◆ get_id()

std::string madara::filters::LZ4BufferFilter::get_id ( void  )
virtual

Gets the id of the filter.

This is used in the serialization process for transports and checkpoints to identify which filter is used.

Implements madara::filters::BufferFilter.

Definition at line 54 of file LZ4BufferFilter.cpp.

◆ get_version()

uint32_t madara::filters::LZ4BufferFilter::get_version ( void  )
virtual

Gets the version of the filter.

See also
madara::utility::get_uint_version for one way to get this from a string version

Implements madara::filters::BufferFilter.

Definition at line 59 of file LZ4BufferFilter.cpp.

Member Data Documentation

◆ buffer_size

int madara::filters::LZ4BufferFilter::buffer_size = 10000000

the size of the decompress buffer (max size)

Definition at line 66 of file LZ4BufferFilter.h.


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