C++ Essence Library 0.1.0
A Utility Library for Modern C++ Programming
Loading...
Searching...
No Matches
essence::io::compresser Class Reference

A general compresser. More...

#include <compresser.hpp>

Public Member Functions

 ES_API (CPPESSENCE) explicit compresser(compression_mode mode)
 Creates an instance.
 
 ES_API (CPPESSENCE) compresser(compresser &&) noexcept
 
 ES_API (CPPESSENCE) ~compresser()
 
 ES_API (CPPESSENCE) compresser &operator
 
template<byte_like_contiguous_range Range>
ES_API(CPPESSENCE) abi ES_API(CPPESSENCE) abi ES_API(CPPESSENCE) abi ES_API(CPPESSENCE) abi abi::vector< std::byte > as_bytes (Range &&range, std::int32_t level) const
 Compresses a byte buffer.
 
template<byte_like_contiguous_range Range>
abi::string as_string (Range &&range, std::int32_t level) const
 Compresses a byte buffer as a string.
 
template<byte_like_contiguous_range Range>
abi::vector< std::byte > inverse_as_bytes (Range &&range) const
 Decompress a byte buffer.
 
template<byte_like_contiguous_range Range>
abi::string inverse_as_string (Range &&range) const
 Decompresses a byte buffer as a string.
 

Detailed Description

A general compresser.

Member Function Documentation

◆ as_bytes()

template<byte_like_contiguous_range Range>
ES_API(CPPESSENCE) abi ES_API(CPPESSENCE) abi ES_API(CPPESSENCE) abi ES_API(CPPESSENCE) abi abi::vector< std::byte > essence::io::compresser::as_bytes ( Range && range,
std::int32_t level ) const
inlinenodiscard

Compresses a byte buffer.

Parameters
bufferThe buffer.
levelThe compression level.
Returns
The compressed data.

Compresses a byte buffer as a string.

Parameters
bufferThe buffer.
levelThe compression level.
Returns
The compressed data as a string.

Decompress a byte buffer.

Parameters
bufferThe buffer.
Returns
The decompressed data.

Decompresses a byte buffer as a string.

Parameters
bufferThe buffer.
Returns
The decompressed data.

Compresses a byte buffer.

Template Parameters
RangeThe type of the range.
Parameters
levelThe compression level.
Returns
The compressed data.

◆ as_string()

template<byte_like_contiguous_range Range>
abi::string essence::io::compresser::as_string ( Range && range,
std::int32_t level ) const
inline

Compresses a byte buffer as a string.

Template Parameters
RangeThe type of the range.
Parameters
levelThe compression level.
Returns
The compressed data as a string.

◆ ES_API()

essence::io::compresser::ES_API ( CPPESSENCE )

Creates an instance.

Parameters
modeThe compression mode.

◆ inverse_as_bytes()

template<byte_like_contiguous_range Range>
abi::vector< std::byte > essence::io::compresser::inverse_as_bytes ( Range && range) const
inline

Decompress a byte buffer.

Template Parameters
RangeThe type of the range.
Returns
The decompressed data.

◆ inverse_as_string()

template<byte_like_contiguous_range Range>
abi::string essence::io::compresser::inverse_as_string ( Range && range) const
inline

Decompresses a byte buffer as a string.

Template Parameters
RangeThe type of the range.
Returns
The decompressed data.

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