A class for managing data compression and decompression.
More...
#include <compressor.hxx>
|
| Compressor (const Algorithm::Compress &algorithm) noexcept |
| Initializes a Compressor instance with the specified compression algorithm.
|
|
| Compressor (const Compressor &compressor)=default |
| Copy constructor for the Compressor class.
|
|
| Compressor (Compressor &&compressor) noexcept=default |
| Move constructor for the Compressor class.
|
|
| ~Compressor () noexcept=default |
| Destructor for the Compressor class.
|
|
Compressor & | operator= (const Compressor &compressor)=default |
| Copy assignment operator for the Compressor class.
|
|
Compressor & | operator= (Compressor &&compressor) noexcept=default |
| Move assignment operator for the Compressor class.
|
|
Expected< std::string, Exception > | Compress (const std::string &input) const noexcept |
| Compresses a string input using the specified compression algorithm.
|
|
Expected< Buffer::Simple, Exception > | Compress (const Buffer::Simple &buffer) const noexcept |
| Compresses a buffer using the specified compression algorithm.
|
|
Buffer::Consumer | Compress (const Buffer::Consumer consumer) const noexcept |
| Compresses data asynchronously using a Consumer/Producer model.
|
|
Expected< std::string, Exception > | Decompress (const std::string &input) const noexcept |
| Decompresses a string input using the specified compression algorithm.
|
|
Expected< Buffer::Simple, Exception > | Decompress (const Buffer::Simple &buffer) const noexcept |
| Decompresses a buffer using the specified compression algorithm.
|
|
Buffer::Consumer | Decompress (const Buffer::Consumer consumer) const noexcept |
| Decompresses data asynchronously using a Consumer/Producer model.
|
|
A class for managing data compression and decompression.
This class provides methods for compressing and decompressing data using various compression algorithms.
◆ Compressor() [1/3]
StormByte::Crypto::Compressor::Compressor |
( |
const Algorithm::Compress & |
algorithm | ) |
|
|
explicitnoexcept |
Initializes a Compressor instance with the specified compression algorithm.
- Parameters
-
algorithm | The compression algorithm to use. |
◆ Compressor() [2/3]
StormByte::Crypto::Compressor::Compressor |
( |
const Compressor & |
compressor | ) |
|
|
default |
Copy constructor for the Compressor class.
- Parameters
-
◆ Compressor() [3/3]
StormByte::Crypto::Compressor::Compressor |
( |
Compressor && |
compressor | ) |
|
|
defaultnoexcept |
Move constructor for the Compressor class.
- Parameters
-
◆ Compress() [1/3]
Buffer::Consumer StormByte::Crypto::Compressor::Compress |
( |
const Buffer::Consumer |
consumer | ) |
const |
|
noexcept |
Compresses data asynchronously using a Consumer/Producer model.
- Parameters
-
consumer | The Consumer buffer containing the input data. |
- Returns
- A Consumer buffer containing the compressed data.
◆ Compress() [2/3]
Expected< Buffer::Simple, Exception > StormByte::Crypto::Compressor::Compress |
( |
const Buffer::Simple & |
buffer | ) |
const |
|
noexcept |
Compresses a buffer using the specified compression algorithm.
- Parameters
-
buffer | The buffer to compress. |
- Returns
- An Expected containing the compressed buffer or an error.
◆ Compress() [3/3]
Expected< std::string, Exception > StormByte::Crypto::Compressor::Compress |
( |
const std::string & |
input | ) |
const |
|
noexcept |
Compresses a string input using the specified compression algorithm.
- Parameters
-
input | The string to compress. |
- Returns
- An Expected containing the compressed string or an error.
◆ Decompress() [1/3]
Buffer::Consumer StormByte::Crypto::Compressor::Decompress |
( |
const Buffer::Consumer |
consumer | ) |
const |
|
noexcept |
Decompresses data asynchronously using a Consumer/Producer model.
- Parameters
-
consumer | The Consumer buffer containing the compressed data. |
- Returns
- A Consumer buffer containing the decompressed data.
◆ Decompress() [2/3]
Expected< Buffer::Simple, Exception > StormByte::Crypto::Compressor::Decompress |
( |
const Buffer::Simple & |
buffer | ) |
const |
|
noexcept |
Decompresses a buffer using the specified compression algorithm.
- Parameters
-
buffer | The buffer to decompress. |
- Returns
- An Expected containing the decompressed buffer or an error.
◆ Decompress() [3/3]
Expected< std::string, Exception > StormByte::Crypto::Compressor::Decompress |
( |
const std::string & |
input | ) |
const |
|
noexcept |
Decompresses a string input using the specified compression algorithm.
- Parameters
-
input | The string to decompress. |
- Returns
- An Expected containing the decompressed string or an error.
◆ operator=() [1/2]
Move assignment operator for the Compressor class.
- Parameters
-
- Returns
- A reference to the updated Compressor instance.
◆ operator=() [2/2]
Copy assignment operator for the Compressor class.
- Parameters
-
- Returns
- A reference to the updated Compressor instance.
The documentation for this class was generated from the following file:
- /home/runner/work/StormByte-Crypto/StormByte-Crypto/lib/public/StormByte/crypto/compressor.hxx