Botan 3.6.1
Crypto and TLS for C&
Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType > Class Template Referenceabstract

#include <compress_utils.h>

Inheritance diagram for Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType >:
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
 
Zlib_Style_Streamoperator= (const Zlib_Style_Stream &other)=delete
 
Zlib_Style_Streamoperator= (Zlib_Style_Stream &&other)=delete
 
virtual bool run (uint32_t flags)=0
 
virtual uint32_t run_flag () const =0
 
 Zlib_Style_Stream ()
 
 Zlib_Style_Stream (const Zlib_Style_Stream &other)=delete
 
 Zlib_Style_Stream (Zlib_Style_Stream &&other)=delete
 
 ~Zlib_Style_Stream () override
 

Protected Types

typedef Stream stream_t
 

Protected Member Functions

Compression_Alloc_Infoalloc ()
 
stream_tstreamp ()
 

Detailed Description

template<typename Stream, typename ByteType, typename StreamLenType = size_t>
class Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType >

Wrapper for Zlib/Bzlib/LZMA stream types

Definition at line 42 of file compress_utils.h.

Member Typedef Documentation

◆ stream_t

template<typename Stream , typename ByteType , typename StreamLenType = size_t>
Stream Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType >::stream_t
protected

Definition at line 68 of file compress_utils.h.

Constructor & Destructor Documentation

◆ Zlib_Style_Stream() [1/3]

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

Definition at line 58 of file compress_utils.h.

58: m_allocs(std::make_unique<Compression_Alloc_Info>()) { clear_mem(&m_stream, 1); }
constexpr void clear_mem(T *ptr, size_t n)
Definition mem_ops.h:120

References Botan::clear_mem().

◆ Zlib_Style_Stream() [2/3]

template<typename Stream , typename ByteType , typename StreamLenType = size_t>
Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType >::Zlib_Style_Stream ( const Zlib_Style_Stream< Stream, ByteType, StreamLenType > & other)
delete

◆ Zlib_Style_Stream() [3/3]

template<typename Stream , typename ByteType , typename StreamLenType = size_t>
Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType >::Zlib_Style_Stream ( Zlib_Style_Stream< Stream, ByteType, StreamLenType > && other)
delete

◆ ~Zlib_Style_Stream()

template<typename Stream , typename ByteType , typename StreamLenType = size_t>
Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType >::~Zlib_Style_Stream ( )
inlineoverride

Definition at line 65 of file compress_utils.h.

65{ clear_mem(&m_stream, 1); }

References Botan::clear_mem().

Member Function Documentation

◆ alloc()

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

Definition at line 72 of file compress_utils.h.

72{ return m_allocs.get(); }

◆ avail_in()

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

Implements Botan::Compression_Stream.

Definition at line 54 of file compress_utils.h.

54{ return m_stream.avail_in; }

◆ avail_out()

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

Implements Botan::Compression_Stream.

Definition at line 56 of file compress_utils.h.

56{ 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 , typename StreamLenType = size_t>
void Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType >::next_in ( uint8_t * b,
size_t len )
inlineoverridevirtual

Implements Botan::Compression_Stream.

Definition at line 44 of file compress_utils.h.

44 {
45 m_stream.next_in = reinterpret_cast<ByteType*>(b);
46 m_stream.avail_in = static_cast<StreamLenType>(len);
47 }
const SIMD_8x32 & b

References Botan::b.

◆ next_out()

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

Implements Botan::Compression_Stream.

Definition at line 49 of file compress_utils.h.

49 {
50 m_stream.next_out = reinterpret_cast<ByteType*>(b);
51 m_stream.avail_out = static_cast<StreamLenType>(len);
52 }

References Botan::b.

◆ operator=() [1/2]

template<typename Stream , typename ByteType , typename StreamLenType = size_t>
Zlib_Style_Stream & Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType >::operator= ( const Zlib_Style_Stream< Stream, ByteType, StreamLenType > & other)
delete

◆ operator=() [2/2]

template<typename Stream , typename ByteType , typename StreamLenType = size_t>
Zlib_Style_Stream & Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType >::operator= ( Zlib_Style_Stream< Stream, ByteType, StreamLenType > && other)
delete

◆ 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 , typename StreamLenType = size_t>
stream_t * Botan::Zlib_Style_Stream< Stream, ByteType, StreamLenType >::streamp ( )
inlineprotected

Definition at line 70 of file compress_utils.h.

70{ return &m_stream; }

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