MySQL  8.0.22
Source Code Documentation
binary_log::transaction::compression::None_comp Class Reference

This compressor does not compress. More...

#include <none.h>

Inheritance diagram for binary_log::transaction::compression::None_comp:
binary_log::transaction::compression::Compressor binary_log::transaction::compression::Base_compressor_decompressor

Public Member Functions

 None_comp ()=default
 
void set_compression_level (unsigned int compression_level) override
 No op member function. More...
 
type compression_type_code () override
 Shall get the compressor type code. More...
 
bool open () override
 No op member function. More...
 
std::tuple< std::size_t, boolcompress (const unsigned char *data, size_t length) override
 This member function shall simply copy the input buffer to the output buffer. More...
 
bool close () override
 No op member function. More...
 
- Public Member Functions inherited from binary_log::transaction::compression::Base_compressor_decompressor
 Base_compressor_decompressor ()
 
virtual ~Base_compressor_decompressor ()
 
virtual size_t size ()
 This member function returns the size of the compressed/decompressed data. More...
 
virtual std::size_t capacity ()
 This member function returns the capacity of the buffer. More...
 
virtual bool set_buffer (unsigned char *buffer, std::size_t capacity)
 This member function SHALL set the buffer into which the compressor or decompressor shall write the data after it processes the stream. More...
 
virtual std::tuple< unsigned char *, std::size_t, std::size_t > get_buffer ()
 This member function SHALL return the buffer, the size of its data and its capacity. More...
 
virtual bool reserve (std::size_t bytes)
 This member function expands the buffer by a number of bytes. More...
 

Additional Inherited Members

- Protected Attributes inherited from binary_log::transaction::compression::Base_compressor_decompressor
unsigned char * m_buffer {nullptr}
 The pointer to the buffer holding the data to compress/decompress. More...
 
std::size_t m_buffer_capacity {0}
 The buffer capacity. More...
 
unsigned char * m_buffer_cursor {nullptr}
 A cursor over the buffer. More...
 

Detailed Description

This compressor does not compress.

The only thing that it does is to copy the data from the input to the output buffer.

Constructor & Destructor Documentation

◆ None_comp()

binary_log::transaction::compression::None_comp::None_comp ( )
default

Member Function Documentation

◆ close()

bool binary_log::transaction::compression::None_comp::close ( )
overridevirtual

No op member function.

Returns
false on success, true otherwise.

Implements binary_log::transaction::compression::Base_compressor_decompressor.

◆ compress()

std::tuple< std::size_t, bool > binary_log::transaction::compression::None_comp::compress ( const unsigned char *  data,
size_t  length 
)
overridevirtual

This member function shall simply copy the input buffer to the output buffer.

It shall grow the output buffer if needed.

Parameters
dataa pointer to the buffer holding the data to compress
lengththe size of the data to compress.
Returns
false on success, true otherwise.

Implements binary_log::transaction::compression::Compressor.

◆ compression_type_code()

type binary_log::transaction::compression::None_comp::compression_type_code ( )
overridevirtual

Shall get the compressor type code.

Returns
the compressor type code.

Implements binary_log::transaction::compression::Base_compressor_decompressor.

◆ open()

bool binary_log::transaction::compression::None_comp::open ( )
overridevirtual

No op member function.

Returns
false on success, true otherwise.

Implements binary_log::transaction::compression::Base_compressor_decompressor.

◆ set_compression_level()

void binary_log::transaction::compression::None_comp::set_compression_level ( unsigned int  compression_level)
overridevirtual

No op member function.

Implements binary_log::transaction::compression::Compressor.


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