Botan 3.5.0
Crypto and TLS for C&
|
#include <compression.h>
Public Member Functions | |
virtual void | clear ()=0 |
virtual void | finish (secure_vector< uint8_t > &final_block, size_t offset=0)=0 |
virtual std::string | name () const =0 |
virtual void | start (size_t comp_level=0)=0 |
virtual void | update (secure_vector< uint8_t > &buf, size_t offset=0, bool flush=false)=0 |
virtual | ~Compression_Algorithm ()=default |
Static Public Member Functions | |
static std::unique_ptr< Compression_Algorithm > | create (std::string_view algo_spec) |
static std::unique_ptr< Compression_Algorithm > | create_or_throw (std::string_view algo_spec) |
Interface for a compression algorithm.
Definition at line 20 of file compression.h.
|
virtualdefault |
|
pure virtual |
Reset the state and abort the current message; start can be called again to process a new message.
Implemented in Botan::Stream_Compression.
|
static |
Create an instance based on a name, or return null if the algo combination cannot be found.
Definition at line 29 of file compression.cpp.
References BOTAN_UNUSED, and name().
Referenced by create_or_throw(), and Botan::make_compressor().
|
static |
Create an instance based on a name
algo_spec | algorithm name Throws Lookup_Error if not found. |
Definition at line 59 of file compression.cpp.
References create().
|
pure virtual |
Finish compressing
final_block | in/out parameter |
offset | an offset into final_block to begin processing |
Implemented in Botan::Stream_Compression.
|
pure virtual |
Implemented in Botan::Bzip2_Compression, Botan::Deflate_Compression, Botan::Gzip_Compression, Botan::LZMA_Compression, and Botan::Zlib_Compression.
Referenced by create().
|
pure virtual |
Begin compressing. Most compression algorithms offer a tunable time/compression tradeoff parameter generally represented by an integer in the range of 1 to 9.
If 0 or a value out of range is provided, a compression algorithm specific default is used.
|
pure virtual |
Process some data.
buf | in/out parameter which will possibly be resized or swapped |
offset | an offset into blocks to begin processing |
flush | if true the compressor will be told to flush state |
Implemented in Botan::Stream_Compression.