Botan 2.13.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | List of all members
Botan::Decompression_Algorithm Class Referenceabstract

`#include <compression.h>`

Inheritance diagram for Botan::Decompression_Algorithm:

## 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 ()=0
virtual void | update (secure_vector< uint8_t > &buf, size_t offset=0)=0
virtual | ~Decompression_Algorithm ()=default

## Static Public Member Functions
static std::unique_ptr< Decompression_Algorithm > | create (const std::string &algo_spec)
static std::unique_ptr< Decompression_Algorithm > | create_or_throw (const std::string &algo_spec)

## Detailed Description

Definition at line 81 of file compression.h.

## Constructor & Destructor Documentation

virtual Botan::Decompression_Algorithm::~Decompression_Algorithm | ( |  | ) |
| virtual default

## Member Function Documentation

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.

std::unique_ptr< Decompression_Algorithm > Botan::Decompression_Algorithm::create | ( | const std::string & | algo_spec | ) |
| static

Create an instance based on a name, or return null if the algo combination cannot be found.

Definition at line 98 of file compression.cpp.

References Botan::make_decompressor().

Referenced by create_or_throw().

99 {
100 std::unique_ptr<Decompression_Algorithm> decompressor(make_decompressor(algo));
101 return decompressor;
102 }
Botan::make_decompressor
Decompression_Algorithm * make_decompressor(const std::string &name)
Definition: compression.cpp:71

std::unique_ptr< Decompression_Algorithm > Botan::Decompression_Algorithm::create_or_throw | ( | const std::string & | algo_spec | ) |
| static

Create an instance based on a name

Parameters

  algo_spec | algorithm name Throws Lookup_Error if not found.

Definition at line 106 of file compression.cpp.

References create().

107 {
108 if(auto decompressor = Decompression_Algorithm::create(algo))
109 {
110 return decompressor;
111 }
112 throw Lookup_Error("Decompression", algo, "");
113 }
Botan::Decompression_Algorithm::create
static std::unique_ptr< Decompression_Algorithm > create(const std::string &algo_spec)
Definition: compression.cpp:98

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.

virtual std::string Botan::Decompression_Algorithm::name | ( |  | ) | const
| pure virtual

Returns
  name of the decompression algorithm

Implemented in Botan::Gzip_Decompression, Botan::Deflate_Decompression, Botan::LZMA_Decompression, Botan::Bzip2_Decompression, and Botan::Zlib_Decompression.

Referenced by Botan::Stream_Decompression::finish().

virtual void Botan::Decompression_Algorithm::start | ( |  | ) |
| pure virtual

Begin decompressing. Decompression does not support levels, as compression does.

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:

- src/lib/compression/compression.h
- src/lib/compression/compression.cpp