Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

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

Public Member Functions | List of all members
Botan::Bzip2_Compression Class Referencefinal

`#include <bzip2.h>`

Inheritance diagram for Botan::Bzip2_Compression:

## Public Member Functions
void | clear () finaloverride
void | finish (secure_vector< uint8_t > &buf, size_t offset) finaloverride
std::string | name () const override
void | update (secure_vector< uint8_t > &buf, size_t offset, bool flush) finaloverride

## Detailed Description

Bzip2 Compression

Definition at line 19 of file bzip2.h.

## Member Function Documentation

void Botan::Stream_Compression::clear | ( |  | ) |
| final override virtual inherited

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 55 of file compress_utils.cpp.

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

56 {
57 m_stream.reset();
58 }

void Botan::Stream_Compression::finish | ( | secure_vector< uint8_t > & | final_block,
|  | size_t | offset
| ) |  |
| final override virtual inherited

Finish compressing

Parameters

  final_block | in/out parameter
  offset | an offset into final_block to begin processing

Implements Botan::Compression_Algorithm.

Definition at line 111 of file compress_utils.cpp.

References BOTAN_ASSERT, and Botan::Stream_Compression::clear().

112 {
113 BOTAN_ASSERT(m_stream, "Initialized");
114 process(buf, offset, m_stream->finish_flag());
115 clear();
116 }
BOTAN_ASSERT
#define BOTAN_ASSERT(expr, assertion_made)
Definition: assert.h:27
Botan::Stream_Compression::clear
void clear() finaloverride
Definition: compress_utils.cpp:55

std::string Botan::Bzip2_Compression::name | ( |  | ) | const
| inline override virtual

Returns
  name of the compression algorithm

Implements Botan::Compression_Algorithm.

Definition at line 22 of file bzip2.h.

22 { return "Bzip2_Compression"; }

void Botan::Stream_Compression::update | ( | secure_vector< uint8_t > & | buf,
|  | size_t | offset,
|  | bool | flush
| ) |  |
| final override virtual inherited

Process some data. Input must be in size update_granularity() uint8_t blocks.

Parameters

  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 105 of file compress_utils.cpp.

References BOTAN_ASSERT.

106 {
107 BOTAN_ASSERT(m_stream, "Initialized");
108 process(buf, offset, flush ? m_stream->flush_flag() : m_stream->run_flag());
109 }
BOTAN_ASSERT
#define BOTAN_ASSERT(expr, assertion_made)
Definition: assert.h:27

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

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