#include <compression.h>
Definition at line 78 of file compression.h.
◆ ~Decompression_Algorithm()
virtual Botan::Decompression_Algorithm::~Decompression_Algorithm |
( |
| ) |
|
|
virtualdefault |
◆ clear()
virtual void Botan::Decompression_Algorithm::clear |
( |
| ) |
|
|
pure virtual |
Reset the state and abort the current message; start can be called again to process a new message.
Implemented in Botan::Stream_Decompression.
◆ create()
Create an instance based on a name, or return null if the algo combination cannot be found.
Definition at line 67 of file compression.cpp.
67 {
68#if defined(BOTAN_HAS_ZLIB)
69 if(
name ==
"Zlib" ||
name ==
"zlib") {
70 return std::make_unique<Zlib_Decompression>();
71 }
73 return std::make_unique<Gzip_Decompression>();
74 }
75 if(
name ==
"Deflate" ||
name ==
"deflate") {
76 return std::make_unique<Deflate_Decompression>();
77 }
78#endif
79
80#if defined(BOTAN_HAS_BZIP2)
81 if(
name ==
"bzip2" ||
name ==
"bz2" ||
name ==
"Bzip2") {
82 return std::make_unique<Bzip2_Decompression>();
83 }
84#endif
85
86#if defined(BOTAN_HAS_LZMA)
88 return std::make_unique<LZMA_Decompression>();
89 }
90#endif
91
93 return nullptr;
94}
virtual std::string name() const =0
References BOTAN_UNUSED, and name().
Referenced by create_or_throw(), and Botan::make_decompressor().
◆ create_or_throw()
std::unique_ptr< Decompression_Algorithm > Botan::Decompression_Algorithm::create_or_throw |
( |
std::string_view | algo_spec | ) |
|
|
static |
Create an instance based on a name
- Parameters
-
Definition at line 97 of file compression.cpp.
97 {
99 return decompressor;
100 }
101 throw Lookup_Error("Decompression", algo, "");
102}
static std::unique_ptr< Decompression_Algorithm > create(std::string_view algo_spec)
References create().
◆ finish()
virtual void Botan::Decompression_Algorithm::finish |
( |
secure_vector< uint8_t > & | final_block, |
|
|
size_t | offset = 0 ) |
|
pure virtual |
Finish decompressing
- Parameters
-
final_block | in/out parameter |
offset | an offset into final_block to begin processing |
Implemented in Botan::Stream_Decompression.
◆ name()
virtual std::string Botan::Decompression_Algorithm::name |
( |
| ) |
const |
|
pure virtual |
◆ start()
virtual void Botan::Decompression_Algorithm::start |
( |
| ) |
|
|
pure virtual |
Begin decompressing. Decompression does not support levels, as compression does.
◆ update()
virtual void Botan::Decompression_Algorithm::update |
( |
secure_vector< uint8_t > & | buf, |
|
|
size_t | offset = 0 ) |
|
pure virtual |
Process some data.
- Parameters
-
buf | in/out parameter which will possibly be resized or swapped |
offset | an offset into blocks to begin processing |
Implemented in Botan::Stream_Decompression.
The documentation for this class was generated from the following files: