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 | Protected Types | Protected Member Functions | List of all members
Botan::Zlib_Style_Stream< Stream, ByteType > Class Template Referenceabstract

`#include <compress_utils.h>`

Inheritance diagram for Botan::Zlib_Style_Stream< Stream, ByteType >:

## Public Member Functions
size_t | avail_in () const override
size_t | avail_out () const override
virtual uint32_t | finish_flag () const =0
virtual uint32_t | flush_flag () const =0
void | next_in (uint8_t *b, size_t len) override
void | next_out (uint8_t *b, size_t len) override
virtual bool | run (uint32_t flags)=0
virtual uint32_t | run_flag () const =0
| Zlib_Style_Stream ()
| ~Zlib_Style_Stream ()

## Protected Types
typedef Stream | stream_t

## Protected Member Functions
Compression_Alloc_Info * | alloc ()
stream_t * | streamp ()

## Detailed Description

### template<typename Stream, typename ByteType>
class Botan::Zlib_Style_Stream< Stream, ByteType >

Wrapper for Zlib/Bzlib/LZMA stream types

Definition at line 45 of file compress_utils.h.

## Member Typedef Documentation

template<typename Stream , typename ByteType >

typedef Stream Botan::Zlib_Style_Stream< Stream, ByteType >::stream_t
| protected

Definition at line 77 of file compress_utils.h.

## Constructor & Destructor Documentation

template<typename Stream , typename ByteType >

Botan::Zlib_Style_Stream< Stream, ByteType >::Zlib_Style_Stream | ( |  | ) |
| inline

Definition at line 64 of file compress_utils.h.

References Botan::clear_mem().

65 {
66 clear_mem(&m_stream, 1);
67 m_allocs.reset(new Compression_Alloc_Info);
68 }
Botan::clear_mem
void clear_mem(T *ptr, size_t n)
Definition: mem_ops.h:57
template<typename Stream , typename ByteType >

Botan::Zlib_Style_Stream< Stream, ByteType >::~Zlib_Style_Stream | ( |  | ) |
| inline

Definition at line 70 of file compress_utils.h.

References Botan::clear_mem().

71 {
72 clear_mem(&m_stream, 1);
73 m_allocs.reset();
74 }
Botan::clear_mem
void clear_mem(T *ptr, size_t n)
Definition: mem_ops.h:57

## Member Function Documentation

template<typename Stream , typename ByteType >

Compression_Alloc_Info* Botan::Zlib_Style_Stream< Stream, ByteType >::alloc | ( |  | ) |
| inline protected

Definition at line 81 of file compress_utils.h.

81 { return m_allocs.get(); }
template<typename Stream , typename ByteType >

size_t Botan::Zlib_Style_Stream< Stream, ByteType >::avail_in | ( |  | ) | const
| inline override virtual

Implements Botan::Compression_Stream.

Definition at line 60 of file compress_utils.h.

60 { return m_stream.avail_in; }
template<typename Stream , typename ByteType >

size_t Botan::Zlib_Style_Stream< Stream, ByteType >::avail_out | ( |  | ) | const
| inline override virtual

Implements Botan::Compression_Stream.

Definition at line 62 of file compress_utils.h.

62 { return m_stream.avail_out; }

virtual uint32_t Botan::Compression_Stream::finish_flag | ( |  | ) | const
| pure virtual inherited

virtual uint32_t Botan::Compression_Stream::flush_flag | ( |  | ) | const
| pure virtual inherited

template<typename Stream , typename ByteType >

void Botan::Zlib_Style_Stream< Stream, ByteType >::next_in | ( | uint8_t * | b,
|  | size_t | len
| ) |  |
| inline override virtual

Implements Botan::Compression_Stream.

Definition at line 48 of file compress_utils.h.

49 {
50 m_stream.next_in = reinterpret_cast<ByteType*>(b);
51 m_stream.avail_in = len;
52 }
template<typename Stream , typename ByteType >

void Botan::Zlib_Style_Stream< Stream, ByteType >::next_out | ( | uint8_t * | b,
|  | size_t | len
| ) |  |
| inline override virtual

Implements Botan::Compression_Stream.

Definition at line 54 of file compress_utils.h.

55 {
56 m_stream.next_out = reinterpret_cast<ByteType*>(b);
57 m_stream.avail_out = len;
58 }

virtual bool Botan::Compression_Stream::run | ( | uint32_t | flags | ) |
| pure virtual inherited

virtual uint32_t Botan::Compression_Stream::run_flag | ( |  | ) | const
| pure virtual inherited

template<typename Stream , typename ByteType >

stream_t* Botan::Zlib_Style_Stream< Stream, ByteType >::streamp | ( |  | ) |
| inline protected

Definition at line 79 of file compress_utils.h.

79 { return &m_stream; }

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

- src/lib/compression/compress_utils.h