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::Bzip2 Class Referencefinal

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

#include <bzip2.hxx>

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

Public Member Functions

 Bzip2 (unsigned short level=5)
 Constructor.
 
 Bzip2 (const Bzip2 &other)=default
 Copy constructor.
 
 Bzip2 (Bzip2 &&other) noexcept=default
 Move constructor.
 
 ~Bzip2 () noexcept=default
 Virtual destructor.
 
Bzip2operator= (const Bzip2 &other)=default
 Copy assignment operator.
 
Bzip2operator= (Bzip2 &&other) noexcept=default
 Move assignment operator.
 
PointerType Clone () const override
 Clone the Bzip2 compressor.
 
PointerType Move () noexcept override
 Move the Bzip2 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 Bzip2 compression algorithm.

Constructor & Destructor Documentation

◆ Bzip2() [1/3]

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

Constructor.

Parameters
levelThe compression level.

◆ Bzip2() [2/3]

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

Copy constructor.

Parameters
otherThe other Bzip2 compressor to copy from.

◆ Bzip2() [3/3]

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

Move constructor.

Parameters
otherThe other Bzip2 compressor to move from.

Member Function Documentation

◆ Clone()

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

Clone the Bzip2 compressor.

Returns
A unique pointer to the cloned Bzip2 compressor.

◆ Move()

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

Move the Bzip2 compressor.

Returns
A unique pointer to the moved Bzip2 compressor.

◆ operator=() [1/2]

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

Move assignment operator.

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

◆ operator=() [2/2]

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

Copy assignment operator.

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

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