qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
qb::compression::decompress_provider Class Referenceabstract

Abstract interface for decompression algorithm providers. More...

#include <compression.h>

Public Member Functions

virtual const std::string & algorithm () const =0
 Get the name of the decompression algorithm.
virtual std::size_t decompress (const uint8_t *input, std::size_t input_size, uint8_t *output, std::size_t output_size, operation_hint hint, std::size_t &input_bytes_processed, bool &done)=0
 Decompress a block of data.
virtual void reset ()=0
 Reset the decompressor to its initial state.
virtual ~decompress_provider ()=default
 Virtual destructor.

Detailed Description

Abstract interface for decompression algorithm providers.

This class defines the interface that all decompression algorithm implementations must implement. It provides methods for decompression operations and algorithm identification.

Member Function Documentation

◆ algorithm()

virtual const std::string & qb::compression::decompress_provider::algorithm ( ) const
pure virtual

Get the name of the decompression algorithm.

Returns
Reference to a string containing the algorithm name

◆ decompress()

virtual std::size_t qb::compression::decompress_provider::decompress ( const uint8_t * input,
std::size_t input_size,
uint8_t * output,
std::size_t output_size,
operation_hint hint,
std::size_t & input_bytes_processed,
bool & done )
pure virtual

Decompress a block of data.

Parameters
inputPointer to the compressed input data
input_sizeSize of the input data in bytes
outputPointer to the output buffer where decompressed data will be written
output_sizeSize of the output buffer in bytes
hintHint about whether this is the last block or more blocks will follow
input_bytes_processed[out] Number of input bytes actually processed
done[out] Flag indicating whether decompression is complete
Returns
Number of bytes written to the output buffer

◆ reset()

virtual void qb::compression::decompress_provider::reset ( )
pure virtual

Reset the decompressor to its initial state.

This method should reset any internal state of the decompressor, allowing it to be reused for a new decompression stream.