Botan  2.1.0
Crypto and TLS for C++11
Public Member Functions | List of all members
Botan::Stream_Decompression Class Referenceabstract

#include <compression.h>

Inheritance diagram for Botan::Stream_Decompression:
Botan::Decompression_Algorithm Botan::Bzip2_Decompression Botan::Deflate_Decompression Botan::Gzip_Decompression Botan::LZMA_Decompression Botan::Zlib_Decompression

Public Member Functions

void clear () finaloverride
 
void finish (secure_vector< uint8_t > &buf, size_t offset) finaloverride
 
virtual std::string name () const =0
 
void update (secure_vector< uint8_t > &buf, size_t offset) finaloverride
 

Detailed Description

FIXME add doc

Definition at line 155 of file compression.h.

Member Function Documentation

void Botan::Stream_Decompression::clear ( )
finaloverridevirtual

Reset the state and abort the current message; start can be called again to process a new message.

Implements Botan::Decompression_Algorithm.

Definition at line 118 of file compress_utils.cpp.

119  {
120  m_stream.reset();
121  }
void Botan::Stream_Decompression::finish ( secure_vector< uint8_t > &  final_block,
size_t  offset 
)
finaloverridevirtual

Finish decompressing

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

Implements Botan::Decompression_Algorithm.

Definition at line 180 of file compress_utils.cpp.

References Botan::Decompression_Algorithm::name().

181  {
182  if(buf.size() != offset || m_stream.get())
183  process(buf, offset, m_stream->finish_flag());
184 
185  if(m_stream.get())
186  throw Exception(name() + " finished but not at stream end");
187  }
virtual std::string name() const =0
virtual std::string Botan::Decompression_Algorithm::name ( ) const
pure virtualinherited
void Botan::Stream_Decompression::update ( secure_vector< uint8_t > &  buf,
size_t  offset 
)
finaloverridevirtual

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

Parameters
bufin/out parameter which will possibly be resized or swapped
offsetan offset into blocks to begin processing

Implements Botan::Decompression_Algorithm.

Definition at line 175 of file compress_utils.cpp.

176  {
177  process(buf, offset, m_stream->run_flag());
178  }

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