MySQL 8.0.39
Source Code Documentation
|
Decompressor class that uses the ZSTD library. More...
#include <zstd_dec.h>
Public Types | |
using | Char_t = unsigned char |
using | Grow_constraint_t = mysqlns::buffer::Grow_constraint |
using | Size_t = mysqlns::buffer::Buffer_view< Char_t >::Size_t |
Public Types inherited from binary_log::transaction::compression::Decompressor | |
using | Char_t = unsigned char |
using | Size_t = mysqlns::buffer::Buffer_view< Char_t >::Size_t |
using | Managed_buffer_t = mysqlns::buffer::Managed_buffer< Char_t > |
using | Grow_constraint_t = mysqlns::buffer::Grow_constraint |
Public Member Functions | |
Zstd_dec () | |
~Zstd_dec () override | |
Zstd_dec (const Zstd_dec &)=delete | |
Zstd_dec (const Zstd_dec &&)=delete | |
Zstd_dec & | operator= (const Zstd_dec &)=delete |
Zstd_dec & | operator= (const Zstd_dec &&)=delete |
Public Member Functions inherited from binary_log::transaction::compression::Decompressor | |
Decompressor ()=default | |
Decompressor (const Decompressor &)=delete | |
Decompressor (const Decompressor &&)=delete | |
const Decompressor & | operator= (const Decompressor &)=delete |
const Decompressor & | operator= (const Decompressor &&)=delete |
virtual | ~Decompressor ()=default |
type | get_type_code () const |
void | reset () |
Reset the frame. More... | |
template<class Input_char_t > | |
void | feed (const Input_char_t *input_data, Size_t input_size) |
Submit data to decompress. More... | |
Decompress_status | decompress (Managed_buffer_t &out, Size_t output_size) |
Decompress an exact, given number of bytes. More... | |
std::pair< Decompress_status, Size_t > | decompress (Char_t *out, Size_t output_size) |
Decompress an exact, given number of bytes. More... | |
Grow_constraint_t | get_grow_constraint_hint () const |
Return a Grow_constraint that may be used with the Managed_buffer storing the output, in order to optimize memory usage for a particular compression algorithm. More... | |
Static Public Attributes | |
static constexpr type | type_code = ZSTD |
Private Member Functions | |
type | do_get_type_code () const override |
void | do_reset () override |
Implement do_reset . More... | |
void | do_feed (const Char_t *input_data, Size_t input_size) override |
Implement feed . More... | |
std::pair< Decompress_status, Size_t > | do_decompress (Char_t *out, Size_t output_size) override |
Implement decompress . More... | |
Grow_constraint_t | do_get_grow_constraint_hint () const override |
Implement get_grow_constraint_hint . More... | |
void | destroy () |
Deallocate the ZSTD decompression context. More... | |
Private Attributes | |
ZSTD_DStream * | m_ctx {nullptr} |
ZSTD decompression context object. More... | |
ZSTD_inBuffer | m_ibuf {nullptr, 0, 0} |
ZSTD input buffer. More... | |
bool | m_frame_boundary = false |
Decompressor class that uses the ZSTD library.
using binary_log::transaction::compression::Decompressor::Char_t = unsigned char |
using binary_log::transaction::compression::Decompressor::Grow_constraint_t = mysqlns::buffer::Grow_constraint |
using binary_log::transaction::compression::Decompressor::Size_t = mysqlns::buffer::Buffer_view<Char_t>::Size_t |
binary_log::transaction::compression::Zstd_dec::Zstd_dec | ( | ) |
|
override |
|
delete |
|
delete |
|
private |
Deallocate the ZSTD decompression context.
|
overrideprivatevirtual |
Implement decompress
.
This differs from decompress
in that it does not have to reset the frame when returning out_of_memory or corrupted; the caller does that.
Implements binary_log::transaction::compression::Decompressor.
|
overrideprivatevirtual |
Implement feed
.
Implements binary_log::transaction::compression::Decompressor.
|
overrideprivatevirtual |
Implement get_grow_constraint_hint
.
In this base class, the function returns a default-constructed Grow_constraint, i.e., one which does not limit the Grow_calculator.
Reimplemented from binary_log::transaction::compression::Decompressor.
|
overrideprivatevirtual |
Implements binary_log::transaction::compression::Decompressor.
|
overrideprivatevirtual |
Implement do_reset
.
Implements binary_log::transaction::compression::Decompressor.
|
private |
ZSTD decompression context object.
|
private |
|
private |
ZSTD input buffer.