StormByte C++ Library: Crypto module 0.0.9999
StormByte-Crypto is a StormByte library module for handling cryptographic operations
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StormByte::Crypto::Compressor::Zlib Class Referencefinal

A class representing the Zlib compression algorithm. More...

#include <zlib.hxx>

Inheritance diagram for StormByte::Crypto::Compressor::Zlib:
Inheritance graph
[legend]
Collaboration diagram for StormByte::Crypto::Compressor::Zlib:
Collaboration graph
[legend]

Public Member Functions

 Zlib (unsigned short level=5)
 Constructor.
 
 Zlib (const Zlib &other)=default
 Copy constructor.
 
 Zlib (Zlib &&other) noexcept=default
 Move constructor.
 
 ~Zlib () noexcept=default
 Virtual destructor.
 
Zliboperator= (const Zlib &other)=default
 Copy assignment operator.
 
Zliboperator= (Zlib &&other) noexcept=default
 Move assignment operator.
 
PointerType Clone () const override
 Clone the Zlib compressor.
 
PointerType Move () noexcept override
 Move the Zlib compressor.
 
- Public Member Functions inherited from StormByte::Crypto::Compressor::Generic
 Generic (const Generic &other)=default
 Copy constructor.
 
 Generic (Generic &&other) noexcept=default
 Move constructor.
 
virtual ~Generic () noexcept=default
 Virtual destructor.
 
Genericoperator= (const Generic &other)=default
 Copy assignment operator.
 
Genericoperator= (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.
 

Additional Inherited Members

- Protected Member Functions inherited from StormByte::Crypto::Compressor::Generic
 Generic (enum Type type, unsigned short level=5)
 Constructor.
 
- Protected Attributes inherited from StormByte::Crypto::Compressor::Generic
enum Type m_type
 The type of compressor.
 
unsigned short m_level = 0
 The compression level.
 

Detailed Description

A class representing the Zlib compression algorithm.

Constructor & Destructor Documentation

◆ Zlib() [1/3]

StormByte::Crypto::Compressor::Zlib::Zlib ( unsigned short  level = 5)

Constructor.

Parameters
levelThe compression level.

◆ Zlib() [2/3]

StormByte::Crypto::Compressor::Zlib::Zlib ( const Zlib other)
default

Copy constructor.

Parameters
otherThe other Zlib compressor to copy from.

◆ Zlib() [3/3]

StormByte::Crypto::Compressor::Zlib::Zlib ( Zlib &&  other)
defaultnoexcept

Move constructor.

Parameters
otherThe other Zlib compressor to move from.

Member Function Documentation

◆ Clone()

PointerType StormByte::Crypto::Compressor::Zlib::Clone ( ) const
inlineoverride

Clone the Zlib compressor.

Returns
A unique pointer to the cloned Zlib compressor.

◆ Move()

PointerType StormByte::Crypto::Compressor::Zlib::Move ( )
inlineoverridenoexcept

Move the Zlib compressor.

Returns
A unique pointer to the moved Zlib compressor.

◆ operator=() [1/2]

Zlib & StormByte::Crypto::Compressor::Zlib::operator= ( const Zlib other)
default

Copy assignment operator.

Parameters
otherThe other Zlib compressor to copy from.
Returns
Reference to this Zlib compressor.

◆ operator=() [2/2]

Zlib & StormByte::Crypto::Compressor::Zlib::operator= ( Zlib &&  other)
defaultnoexcept

Move assignment operator.

Parameters
otherThe other Zlib compressor to move from.
Returns
Reference to this Zlib compressor.

The documentation for this class was generated from the following file: