24#ifndef MYSQL_BINLOG_EVENT_COMPRESSION_DECOMPRESSOR_H
25#define MYSQL_BINLOG_EVENT_COMPRESSION_DECOMPRESSOR_H
89 template <
class Input_
char_t>
90 void feed(
const Input_char_t *input_data,
Size_t input_size) {
Abstract base class for decompressors.
Definition: decompressor.h:57
virtual std::pair< Decompress_status, Size_t > do_decompress(Char_t *out, Size_t output_size)=0
Implement decompress.
mysql::containers::buffers::Managed_buffer< Char_t > Managed_buffer_t
Definition: decompressor.h:61
mysql::containers::buffers::Buffer_view< Char_t >::Size_t Size_t
Definition: decompressor.h:60
void feed(const Input_char_t *input_data, Size_t input_size)
Submit data to decompress.
Definition: decompressor.h:90
Grow_constraint_t get_grow_constraint_hint() const
Return a Grow_constraint that may be used with the Managed_buffer storing the output,...
Definition: decompressor.cpp:72
Decompressor(const Decompressor &&)=delete
void reset()
Reset the frame.
Definition: decompressor.cpp:30
virtual type do_get_type_code() const =0
Implement get_type_code.
Decompressor(const Decompressor &)=delete
virtual Grow_constraint_t do_get_grow_constraint_hint() const
Implement get_grow_constraint_hint.
Definition: decompressor.cpp:76
const Decompressor & operator=(const Decompressor &&)=delete
virtual void do_reset()=0
Implement do_reset.
unsigned char Char_t
Definition: decompressor.h:59
const Decompressor & operator=(const Decompressor &)=delete
mysql::containers::buffers::Grow_constraint Grow_constraint_t
Definition: decompressor.h:62
type get_type_code() const
Definition: decompressor.cpp:28
virtual void do_feed(const Char_t *input_data, Size_t input_size)=0
Implement feed.
Decompress_status decompress(Managed_buffer_t &out, Size_t output_size)
Decompress an exact, given number of bytes.
Definition: decompressor.cpp:40
virtual ~Decompressor()=default
void feed_char_t(const Char_t *input_data, Size_t input_size)
Definition: decompressor.cpp:35
std::size_t Size_t
The 'size' type.
Definition: buffer_view.h:55
Description of a heuristic to determine how much memory to allocate.
Definition: grow_constraint.h:66
Owned, growable, contiguous memory buffer.
Definition: managed_buffer.h:108
Container class that provides a contiguous memory buffer to the caller, which the caller can request ...
type
Definition: base.h:40
Decompress_status
Definition: decompress_status.h:32
Grow_status
Error statuses for classes that use Grow_calculator.
Definition: grow_status.h:38
#define NODISCARD
The function attribute [[NODISCARD]] is a replacement for [[nodiscard]] to workaround a gcc bug.
Definition: nodiscard.h:47