A generic compressor class.
More...
#include <generic.hxx>
|
| | Generic (const Generic &other)=default |
| | Copy constructor.
|
| |
| | Generic (Generic &&other) noexcept=default |
| | Move constructor.
|
| |
|
virtual | ~Generic () noexcept=default |
| | Virtual destructor.
|
| |
| Generic & | operator= (const Generic &other)=default |
| | Copy assignment operator.
|
| |
| Generic & | operator= (Generic &&other) noexcept=default |
| | Move assignment operator.
|
| |
| bool | Compress (const std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept |
| | Compress data from input buffer to output buffer.
|
| |
| bool | Compress (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept |
| | Compress data from input buffer to output buffer.
|
| |
| bool | Compress (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept |
| | Compress data from input buffer to output buffer, moving the input data.
|
| |
| Buffer::Consumer | Compress (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept |
| | Compress data from a Consumer buffer.
|
| |
| bool | Decompress (const std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept |
| | Decompress data from input buffer to output buffer.
|
| |
| bool | Decompress (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept |
| | Decompress data from input buffer to output buffer.
|
| |
| bool | Decompress (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept |
| | Decompress data from input buffer to output buffer, moving the input data.
|
| |
| Buffer::Consumer | Decompress (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept |
| | Decompress data from a Consumer buffer.
|
| |
| unsigned short | Level () const noexcept |
| | Gets the compression level.
|
| |
| enum Type | Type () const noexcept |
| | Gets the type of compressor.
|
| |
|
| | Generic (enum Type type, unsigned short level=5) |
| | Constructor.
|
| |
|
|
enum Type | m_type |
| | The type of compressor.
|
| |
|
unsigned short | m_level = 0 |
| | The compression level.
|
| |
A generic compressor class.
◆ Generic() [1/3]
| StormByte::Crypto::Compressor::Generic::Generic |
( |
const Generic & |
other | ) |
|
|
default |
Copy constructor.
- Parameters
-
| other | The other Generic compressor to copy from. |
◆ Generic() [2/3]
| StormByte::Crypto::Compressor::Generic::Generic |
( |
Generic && |
other | ) |
|
|
defaultnoexcept |
Move constructor.
- Parameters
-
| other | The other Generic compressor to move from. |
◆ Generic() [3/3]
| StormByte::Crypto::Compressor::Generic::Generic |
( |
enum Type |
type, |
|
|
unsigned short |
level = 5 |
|
) |
| |
|
inlineprotected |
Constructor.
- Parameters
-
| type | The type of compressor. |
◆ Compress() [1/4]
| Buffer::Consumer StormByte::Crypto::Compressor::Generic::Compress |
( |
Buffer::Consumer |
consumer, |
|
|
ReadMode |
mode = ReadMode::Move |
|
) |
| const |
|
inlinenoexcept |
Compress data from a Consumer buffer.
- Parameters
-
| consumer | The Consumer buffer to compress. |
| mode | The read mode indicating copy or move. |
- Returns
- A Consumer buffer containing the compressed data.
◆ Compress() [2/4]
| bool StormByte::Crypto::Compressor::Generic::Compress |
( |
Buffer::ReadOnly & |
input, |
|
|
Buffer::WriteOnly & |
output |
|
) |
| const |
|
inlinenoexcept |
Compress data from input buffer to output buffer, moving the input data.
- Parameters
-
| input | The input buffer to compress. |
| output | The output buffer to write the compressed data to. |
- Returns
- true if compression was successful, false otherwise.
◆ Compress() [3/4]
| bool StormByte::Crypto::Compressor::Generic::Compress |
( |
const Buffer::ReadOnly & |
input, |
|
|
Buffer::WriteOnly & |
output |
|
) |
| const |
|
inlinenoexcept |
Compress data from input buffer to output buffer.
- Parameters
-
| input | The input buffer to compress. |
| output | The output buffer to write the compressed data to. |
- Returns
- true if compression was successful, false otherwise.
◆ Compress() [4/4]
| bool StormByte::Crypto::Compressor::Generic::Compress |
( |
const std::span< const std::byte > |
input, |
|
|
Buffer::WriteOnly & |
output |
|
) |
| const |
|
inlinenoexcept |
Compress data from input buffer to output buffer.
- Parameters
-
| input | The input buffer to compress. |
| output | The output buffer to write the compressed data to. |
- Returns
- true if compression was successful, false otherwise.
◆ Decompress() [1/4]
| Buffer::Consumer StormByte::Crypto::Compressor::Generic::Decompress |
( |
Buffer::Consumer |
consumer, |
|
|
ReadMode |
mode = ReadMode::Move |
|
) |
| const |
|
inlinenoexcept |
Decompress data from a Consumer buffer.
- Parameters
-
| consumer | The Consumer buffer to decompress. |
| mode | The read mode indicating copy or move. |
- Returns
- A Consumer buffer containing the compressed data.
◆ Decompress() [2/4]
| bool StormByte::Crypto::Compressor::Generic::Decompress |
( |
Buffer::ReadOnly & |
input, |
|
|
Buffer::WriteOnly & |
output |
|
) |
| const |
|
inlinenoexcept |
Decompress data from input buffer to output buffer, moving the input data.
- Parameters
-
| input | The input buffer to decompress. |
| output | The output buffer to write the decompressed data to. |
- Returns
- true if decompression was successful, false otherwise.
◆ Decompress() [3/4]
| bool StormByte::Crypto::Compressor::Generic::Decompress |
( |
const Buffer::ReadOnly & |
input, |
|
|
Buffer::WriteOnly & |
output |
|
) |
| const |
|
inlinenoexcept |
Decompress data from input buffer to output buffer.
- Parameters
-
| input | The input buffer to decompress. |
| output | The output buffer to write the decompressed data to. |
- Returns
- true if decompression was successful, false otherwise.
◆ Decompress() [4/4]
| bool StormByte::Crypto::Compressor::Generic::Decompress |
( |
const std::span< const std::byte > |
input, |
|
|
Buffer::WriteOnly & |
output |
|
) |
| const |
|
inlinenoexcept |
Decompress data from input buffer to output buffer.
- Parameters
-
| input | The input buffer to decompress. |
| output | The output buffer to write the decompressed data to. |
- Returns
- true if decompression was successful, false otherwise.
◆ Level()
| unsigned short StormByte::Crypto::Compressor::Generic::Level |
( |
| ) |
const |
|
inlinenoexcept |
Gets the compression level.
- Returns
- The compression level.
◆ operator=() [1/2]
| Generic & StormByte::Crypto::Compressor::Generic::operator= |
( |
const Generic & |
other | ) |
|
|
default |
Copy assignment operator.
- Parameters
-
| other | The other Generic compressor to copy from. |
- Returns
- Reference to this Generic compressor.
◆ operator=() [2/2]
| Generic & StormByte::Crypto::Compressor::Generic::operator= |
( |
Generic && |
other | ) |
|
|
defaultnoexcept |
Move assignment operator.
- Parameters
-
| other | The other Generic compressor to move from. |
- Returns
- Reference to this Generic compressor.
◆ Type()
| enum Type StormByte::Crypto::Compressor::Generic::Type |
( |
| ) |
const |
|
inlinenoexcept |
Gets the type of compressor.
- Returns
- The type of compressor.
The documentation for this class was generated from the following file:
- /home/runner/work/StormByte-Crypto/StormByte-Crypto/lib/public/StormByte/crypto/compressor/generic.hxx