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

Factory interface for creating decompression providers. More...

#include <compression.h>

Public Member Functions

virtual const std::string & algorithm () const =0
 Get the name of the decompression algorithm.
virtual uint16_t weight () const =0
 Get the weight of this decompression algorithm.
virtual std::unique_ptr< decompress_providermake_decompressor () const =0
 Create a new decompressor instance.
virtual ~decompress_factory ()=default
 Virtual destructor.

Detailed Description

Factory interface for creating decompression providers.

This class defines the interface for factories that create decompressor instances. It allows the creation of decompressors to be abstracted from their implementation and configuration.

Member Function Documentation

◆ algorithm()

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

Get the name of the decompression algorithm.

Returns
Reference to a string containing the algorithm name

◆ weight()

virtual uint16_t qb::compression::decompress_factory::weight ( ) const
pure virtual

Get the weight of this decompression algorithm.

The weight is used to prioritize decompression algorithms when multiple algorithms are available for a given input.

Returns
Weight value (higher values indicate higher priority)

◆ make_decompressor()

virtual std::unique_ptr< decompress_provider > qb::compression::decompress_factory::make_decompressor ( ) const
pure virtual

Create a new decompressor instance.

Returns
Unique pointer to a newly created decompressor