Botan  1.11.30
Public Types | Public Member Functions | List of all members
Botan::Zlib_Compression Class Referencefinal

#include <zlib.h>

Inheritance diagram for Botan::Zlib_Compression:
Botan::Stream_Compression Botan::Compression_Algorithm

Public Types

typedef SCAN_Name Spec
 

Public Member Functions

void clear () finaloverride
 
void finish (secure_vector< byte > &buf, size_t offset) finaloverride
 
std::string name () const override
 
void update (secure_vector< byte > &buf, size_t offset, bool flush) finaloverride
 

Detailed Description

Zlib Compression

Definition at line 19 of file zlib.h.

Member Typedef Documentation

Definition at line 19 of file compression.h.

Member Function Documentation

void Botan::Stream_Compression::clear ( )
finaloverridevirtualinherited

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 99 of file compression.cpp.

References BOTAN_ASSERT, and Botan::copy_mem().

100  {
101  m_stream.reset();
102  }
void Botan::Stream_Compression::finish ( secure_vector< byte > &  final_block,
size_t  offset 
)
finaloverridevirtualinherited

Finish compressing

Parameters
final_blockin/out parameter
offsetan offset into final_block to begin processing

Implements Botan::Compression_Algorithm.

Definition at line 155 of file compression.cpp.

References BOTAN_ASSERT.

156  {
157  BOTAN_ASSERT(m_stream, "Initialized");
158  process(buf, offset, m_stream->finish_flag());
159  clear();
160  }
#define BOTAN_ASSERT(expr, assertion_made)
Definition: assert.h:27
void clear() finaloverride
Definition: compression.cpp:99
std::string Botan::Zlib_Compression::name ( ) const
inlineoverridevirtual

Implements Botan::Compression_Algorithm.

Definition at line 22 of file zlib.h.

22 { return "Zlib_Compression"; }
void Botan::Stream_Compression::update ( secure_vector< byte > &  buf,
size_t  offset,
bool  flush 
)
finaloverridevirtualinherited

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

Parameters
blocksin/out parameter which will possibly be resized or swapped
offsetan offset into blocks to begin processing
flushif true the compressor will be told to flush state

Implements Botan::Compression_Algorithm.

Definition at line 149 of file compression.cpp.

References BOTAN_ASSERT.

150  {
151  BOTAN_ASSERT(m_stream, "Initialized");
152  process(buf, offset, flush ? m_stream->flush_flag() : m_stream->run_flag());
153  }
#define BOTAN_ASSERT(expr, assertion_made)
Definition: assert.h:27

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