Botan 3.6.1
Crypto and TLS for C&
|
#include <zlib.h>
Public Member Functions | |
void | clear () final |
void | finish (secure_vector< uint8_t > &buf, size_t offset) final |
Gzip_Compression (uint8_t os_code=255, uint64_t hdr_time=0) | |
std::string | name () const override |
void | update (secure_vector< uint8_t > &buf, size_t offset, bool flush) final |
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) |
|
inlineexplicit |
|
finalvirtualinherited |
Reset the state and abort the current message; start can be called again to process a new message.
Implements Botan::Compression_Algorithm.
Definition at line 59 of file compress_utils.cpp.
Referenced by Botan::Stream_Compression::finish().
|
staticinherited |
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 Botan::Compression_Algorithm::name().
Referenced by Botan::Compression_Algorithm::create_or_throw(), and Botan::make_compressor().
|
staticinherited |
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 Botan::Compression_Algorithm::create().
|
finalvirtualinherited |
Finish compressing
The buf
and offset
parameters are treated as in update(). It is acceptable to call start() followed by finish() with the entire message, without any intervening call to update().
final_block | in/out parameter |
offset | an offset into final_block to begin processing |
Implements Botan::Compression_Algorithm.
Definition at line 118 of file compress_utils.cpp.
References BOTAN_ASSERT, and Botan::Stream_Compression::clear().
|
inlineoverridevirtual |
Implements Botan::Compression_Algorithm.
Definition at line 68 of file zlib.h.
|
finalvirtualinherited |
Process some data.
The leading offset
bytes of buf
are ignored and remain untouched; this can be useful for ignoring packet headers. If flush
is true, the compression state is flushed, allowing the decompressor to recover the entire message up to this point without having to see the rest of the compressed stream.
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 |
Implements Botan::Compression_Algorithm.
Definition at line 113 of file compress_utils.cpp.
References BOTAN_ASSERT.