Abstract compressor.
More...
#include <StormByte/crypto/compressor/generic.hxx>
|
| unsigned short | Level () const noexcept |
| | Compression level.
|
| enum Type | Type () const noexcept |
| | Codec of this compressor.
|
| | Generic (const Generic &other)=default |
| | Copy constructor.
|
| | Generic (Generic &&other) noexcept=default |
| | Move constructor.
|
| virtual | ~Generic () noexcept |
| | Destructor.
|
| Generic & | operator= (const Generic &other)=default |
| | Copy assignment.
|
| Generic & | operator= (Generic &&other) noexcept=default |
| | Move assignment.
|
| bool | Compress (const std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept |
| | Compress a byte span.
|
| template<StormByte::Type::ByteInputRange Range> |
| bool | Compress (const Range &input, Buffer::WriteOnly &output) const |
| | Compress an input range of byte-convertible values.
|
| bool | Compress (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept |
| | Compress a read-only buffer (copy).
|
| bool | Compress (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept |
| | Compress a buffer, consuming it.
|
| Buffer::Consumer | Compress (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept |
| | Compress a Consumer into another Consumer.
|
| bool | Decompress (const std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept |
| | Decompress a byte span.
|
| template<StormByte::Type::ByteInputRange Range> |
| bool | Decompress (const Range &input, Buffer::WriteOnly &output) const |
| | Decompress an input range of byte-convertible values.
|
| bool | Decompress (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept |
| | Decompress a read-only buffer (copy).
|
| bool | Decompress (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept |
| | Decompress a buffer, consuming it.
|
| Buffer::Consumer | Decompress (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept |
| | Decompress a Consumer into another Consumer.
|
| constexpr | Clonable ()=default |
| constexpr Clonable & | operator= (const Clonable &)=default |
| virtual constexpr | ~Clonable () noexcept=default |
| virtual PointerType | Clone () const =0 |
| virtual PointerType | Move ()=0 |
|
| | Generic (enum Type type, unsigned short level=5) |
| | Construct with a codec and level.
|
Abstract compressor.
Concrete codecs derive from this.
- Note
- MaybeSafe requires ABI-compatible toolchains and all provider modules to remain loaded while objects, virtual functions or ownership callbacks can be used. The codec enum and arithmetic level are Safe; inline special members own no local heap. Destruction is exported, and owning Clone/Move implementations must allocate and bind creator/deleter callbacks in their provider module through Safe ownership operations. Derived providers must keep every field Safe or satisfy its MaybeSafe requirements, and preserve provider-owned allocation, copying, assignment, movement and destruction.
◆ Generic() [1/3]
| StormByte::Crypto::Compressor::Generic::Generic |
( |
const Generic & | other | ) |
|
|
default |
Copy constructor.
- Parameters
-
◆ Generic() [2/3]
| StormByte::Crypto::Compressor::Generic::Generic |
( |
Generic && | other | ) |
|
|
defaultnoexcept |
Move constructor.
- Parameters
-
◆ ~Generic()
| virtual StormByte::Crypto::Compressor::Generic::~Generic |
( |
| ) |
|
|
virtualnoexcept |
◆ Generic() [3/3]
| StormByte::Crypto::Compressor::Generic::Generic |
( |
enum Type | type, |
|
|
unsigned short | level = 5 ) |
|
inlineprotected |
Construct with a codec and level.
- Parameters
-
| type | Codec. |
| level | Compression level. |
◆ Compress() [1/5]
Compress a Consumer into another Consumer.
- Parameters
-
| consumer | Input consumer. |
| mode | Copy or move. |
- Returns
- Consumer with compressed data.
◆ Compress() [2/5]
Compress a buffer, consuming it.
- Parameters
-
| input | Input buffer. |
| output | Destination buffer. |
- Returns
- true on success.
◆ Compress() [3/5]
Compress a read-only buffer (copy).
- Parameters
-
| input | Input buffer. |
| output | Destination buffer. |
- Returns
- true on success.
◆ Compress() [4/5]
| bool StormByte::Crypto::Compressor::Generic::Compress |
( |
const Range & | input, |
|
|
Buffer::WriteOnly & | output ) const |
|
inline |
Compress an input range of byte-convertible values.
- Template Parameters
-
- Parameters
-
| input | Input values. |
| output | Destination buffer. |
- Returns
- true on success.
◆ Compress() [5/5]
| bool StormByte::Crypto::Compressor::Generic::Compress |
( |
const std::span< const std::byte > | input, |
|
|
Buffer::WriteOnly & | output ) const |
|
inlinenoexcept |
Compress a byte span.
- Parameters
-
| input | Input bytes. |
| output | Destination buffer. |
- Returns
- true on success.
◆ Decompress() [1/5]
Decompress a Consumer into another Consumer.
- Parameters
-
| consumer | Input consumer. |
| mode | Copy or move. |
- Returns
- Consumer with decompressed data.
◆ Decompress() [2/5]
Decompress a buffer, consuming it.
- Parameters
-
| input | Input buffer. |
| output | Destination buffer. |
- Returns
- true on success.
◆ Decompress() [3/5]
Decompress a read-only buffer (copy).
- Parameters
-
| input | Input buffer. |
| output | Destination buffer. |
- Returns
- true on success.
◆ Decompress() [4/5]
| bool StormByte::Crypto::Compressor::Generic::Decompress |
( |
const Range & | input, |
|
|
Buffer::WriteOnly & | output ) const |
|
inline |
Decompress an input range of byte-convertible values.
- Template Parameters
-
- Parameters
-
| input | Input values. |
| output | Destination buffer. |
- Returns
- true on success.
◆ Decompress() [5/5]
| bool StormByte::Crypto::Compressor::Generic::Decompress |
( |
const std::span< const std::byte > | input, |
|
|
Buffer::WriteOnly & | output ) const |
|
inlinenoexcept |
Decompress a byte span.
- Parameters
-
| input | Input bytes. |
| output | Destination buffer. |
- Returns
- true on success.
◆ Level()
| unsigned short StormByte::Crypto::Compressor::Generic::Level |
( |
| ) |
const |
|
inlinenoexcept |
Compression level.
- Returns
- Level.
◆ operator=() [1/2]
| Generic & StormByte::Crypto::Compressor::Generic::operator= |
( |
const Generic & | other | ) |
|
|
default |
Copy assignment.
- Parameters
-
- Returns
- Reference to this compressor.
◆ operator=() [2/2]
| Generic & StormByte::Crypto::Compressor::Generic::operator= |
( |
Generic && | other | ) |
|
|
defaultnoexcept |
Move assignment.
- Parameters
-
- Returns
- Reference to this compressor.
◆ Type()
| enum Type StormByte::Crypto::Compressor::Generic::Type |
( |
| ) |
const |
|
inlinenoexcept |
◆ m_level
| unsigned short StormByte::Crypto::Compressor::Generic::m_level = 0 |
|
protected |
◆ m_type
| enum Type StormByte::Crypto::Compressor::Generic::m_type |
|
protected |
The documentation for this class was generated from the following file: