Botan 2.19.2
Crypto and TLS for C&
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 >:
Botan::Compression_Stream

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_Infoalloc ()
 
stream_tstreamp ()
 

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

◆ stream_t

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

◆ Zlib_Style_Stream()

template<typename Stream , typename ByteType >
Botan::Zlib_Style_Stream< Stream, ByteType >::Zlib_Style_Stream ( )
inline

Definition at line 64 of file compress_utils.h.

65 {
66 clear_mem(&m_stream, 1);
67 m_allocs.reset(new Compression_Alloc_Info);
68 }
void clear_mem(T *ptr, size_t n)
Definition: mem_ops.h:115

References Botan::clear_mem().

◆ ~Zlib_Style_Stream()

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

Definition at line 70 of file compress_utils.h.

71 {
72 clear_mem(&m_stream, 1);
73 m_allocs.reset();
74 }

References Botan::clear_mem().

Member Function Documentation

◆ alloc()

template<typename Stream , typename ByteType >
Compression_Alloc_Info * Botan::Zlib_Style_Stream< Stream, ByteType >::alloc ( )
inlineprotected

Definition at line 81 of file compress_utils.h.

81{ return m_allocs.get(); }

◆ avail_in()

template<typename Stream , typename ByteType >
size_t Botan::Zlib_Style_Stream< Stream, ByteType >::avail_in ( ) const
inlineoverridevirtual

Implements Botan::Compression_Stream.

Definition at line 60 of file compress_utils.h.

60{ return m_stream.avail_in; }

◆ avail_out()

template<typename Stream , typename ByteType >
size_t Botan::Zlib_Style_Stream< Stream, ByteType >::avail_out ( ) const
inlineoverridevirtual

Implements Botan::Compression_Stream.

Definition at line 62 of file compress_utils.h.

62{ return m_stream.avail_out; }

◆ finish_flag()

virtual uint32_t Botan::Compression_Stream::finish_flag ( ) const
pure virtualinherited

◆ flush_flag()

virtual uint32_t Botan::Compression_Stream::flush_flag ( ) const
pure virtualinherited

◆ next_in()

template<typename Stream , typename ByteType >
void Botan::Zlib_Style_Stream< Stream, ByteType >::next_in ( uint8_t *  b,
size_t  len 
)
inlineoverridevirtual

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 }

◆ next_out()

template<typename Stream , typename ByteType >
void Botan::Zlib_Style_Stream< Stream, ByteType >::next_out ( uint8_t *  b,
size_t  len 
)
inlineoverridevirtual

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 }

◆ run()

virtual bool Botan::Compression_Stream::run ( uint32_t  flags)
pure virtualinherited

◆ run_flag()

virtual uint32_t Botan::Compression_Stream::run_flag ( ) const
pure virtualinherited

◆ streamp()

template<typename Stream , typename ByteType >
stream_t * Botan::Zlib_Style_Stream< Stream, ByteType >::streamp ( )
inlineprotected

Definition at line 79 of file compress_utils.h.

79{ return &m_stream; }

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