24#ifndef LIBBINLOGEVENTS_COMPRESSION_DECOMPRESSOR_H_
25#define LIBBINLOGEVENTS_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
unsigned char Char_t
Definition: decompressor.h:59
void feed(const Input_char_t *input_data, Size_t input_size)
Submit data to decompress.
Definition: decompressor.h:90
void reset()
Reset the frame.
Definition: decompressor.cpp:30
const Decompressor & operator=(const Decompressor &)=delete
mysqlns::buffer::Managed_buffer< Char_t > Managed_buffer_t
Definition: decompressor.h:61
const Decompressor & operator=(const Decompressor &&)=delete
virtual void do_feed(const Char_t *input_data, Size_t input_size)=0
Implement feed.
virtual type do_get_type_code() const =0
Implement get_type_code.
mysqlns::buffer::Buffer_view< Char_t >::Size_t Size_t
Definition: decompressor.h:60
virtual std::pair< Decompress_status, Size_t > do_decompress(Char_t *out, Size_t output_size)=0
Implement decompress.
virtual void do_reset()=0
Implement do_reset.
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
mysqlns::buffer::Grow_constraint Grow_constraint_t
Definition: decompressor.h:62
Decompress_status decompress(Managed_buffer_t &out, Size_t output_size)
Decompress an exact, given number of bytes.
Definition: decompressor.cpp:40
Decompressor(const Decompressor &&)=delete
virtual Grow_constraint_t do_get_grow_constraint_hint() const
Implement get_grow_constraint_hint.
Definition: decompressor.cpp:76
type get_type_code() const
Definition: decompressor.cpp:28
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:67
Owned, growable, contiguous memory buffer.
Definition: managed_buffer.h:111
Container class that provides a contiguous memory buffer to the caller, which the caller can request ...
type
Definition: base.h:33
Decompress_status
Definition: decompress_status.h:32
Grow_status
Error statuses for classes that use Grow_calculator.
Definition: grow_status.h:37
#define NODISCARD
The function attribute [[NODISCARD]] is a replacement for [[nodiscard]] to workaround a gcc bug.
Definition: nodiscard.h:47