#include <gr_decompression.h>
◆ Decompress_status_t
◆ Decompressor_t
◆ Managed_buffer_t
◆ enum_decompression_error
Decompression Error.
Enumerator |
---|
DECOMPRESSION_OK | |
ER_COMPRESSION_TYPE_UNKOWN | |
ER_DECOMPRESSION_INIT_FAILURE | |
ER_DECOMPRESSION_EXCEEDS_MAX_BUFFER_SIZE | |
ER_DECOMPRESSION_OUT_OF_MEMORY | |
ER_DECOMPRESSION_TRUNCATED | |
ER_DECOMPRESSION_CORRUPTED | |
ER_DECOMPRESSION_EOF | |
◆ GR_decompress()
◆ ~GR_decompress()
GR_decompress::~GR_decompress |
( |
| ) |
|
◆ decompress()
This shall decompress the buffer provided and put the decompressed payload into the output buffer i.e.
m_managed_buffer.
- Parameters
-
compressed_data | the pointer to the input buffer holding the compressed data which needs to decompress. |
compressed_data_length | the size of the input data to decompress. |
output_size | the exact size of output decompressed data. |
Note: The caller needs to provide exact expected decompressed data in in param 'output_size'. The ZSTD library api in libbinlogevents does have other api's which can be used to get decompressed data in several loops. But in this implementation user has to provide exact size he expects after decompressing data.
- Returns
- GR_compress::enum_decompression_error error type.
◆ get_buffer()
std::pair< unsigned char *, std::size_t > GR_decompress::get_buffer |
( |
| ) |
|
◆ m_compression_type
Initial value:
The compression type.
◆ m_compressor_name
std::string GR_decompress::m_compressor_name {"Zstandard"} |
|
private |
The compression library name.
◆ m_decompressor
ZSTD decompressor class object.
◆ m_managed_buffer
The buffer holding decompressed data.
◆ m_status
The documentation for this class was generated from the following files: