Rosetta 3.3
|
A stream decorator that takes raw input and zips it to a ostream. More...
#include <zipstream.hpp>
Public Types | |
typedef std::basic_streambuf < Elem, Tr > | basic_streambuf_type |
typedef std::basic_ostream < Elem, Tr > & | ostream_reference |
typedef Elem | char_type |
typedef ElemA | char_allocator_type |
typedef ByteT | byte_type |
typedef ByteAT | byte_allocator_type |
typedef byte_type * | byte_buffer_type |
typedef std::vector< byte_type, byte_allocator_type > | byte_vector_type |
typedef std::vector< char_type, char_allocator_type > | char_vector_type |
typedef Tr | traits_type |
typedef Tr::int_type | int_type |
Public Member Functions | |
basic_zip_streambuf (ostream_reference ostream_, size_t level_, EStrategy strategy_, size_t window_size_, size_t memory_level_, size_t buffer_size_) | |
Construct a zip stream. | |
~basic_zip_streambuf () | |
int | sync () |
int_type | overflow (int_type c) |
OVERFLOW. | |
std::streamsize | flush () |
flushes the zip buffer and output buffer | |
std::streamsize | flush_finalize () |
flushes the zip buffer and output buffer and finalize the zip stream | |
void | reset_state () |
resets the zip stream and zeros the crc | |
ostream_reference | get_ostream () const |
returns a reference to the output stream | |
int | get_zerr () const |
returns the latest zlib error status | |
uLong | get_crc () const |
returns the crc of the input data compressed so far | |
uLong | get_in_size () const |
returns the size (bytes) of the input data compressed so far | |
uLong | get_out_size () const |
returns the size (bytes) of the compressed data so far |
A stream decorator that takes raw input and zips it to a ostream.
typedef std::basic_streambuf< Elem, Tr > zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::basic_streambuf_type |
typedef ByteAT zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_allocator_type |
typedef byte_type* zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_buffer_type |
typedef ByteT zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_type |
typedef std::vector< byte_type, byte_allocator_type > zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_vector_type |
typedef ElemA zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::char_allocator_type |
typedef Elem zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::char_type |
typedef std::vector< char_type, char_allocator_type > zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::char_vector_type |
typedef Tr::int_type zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::int_type |
typedef std::basic_ostream< Elem, Tr >& zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::ostream_reference |
typedef Tr zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::traits_type |
zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::basic_zip_streambuf | ( | ostream_reference | ostream_, |
size_t | level_, | ||
EStrategy | strategy_, | ||
size_t | window_size_, | ||
size_t | memory_level_, | ||
size_t | buffer_size_ | ||
) |
Construct a zip stream.
References basic::options::OptionKeys::ddg::min.
zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::~basic_zip_streambuf | ( | ) |
std::streamsize zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::flush | ( | ) |
flushes the zip buffer and output buffer
References basic::options::OptionKeys::dna::design::flush.
std::streamsize zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::flush_finalize | ( | ) |
flushes the zip buffer and output buffer and finalize the zip stream
This method should be called at the end of the compression.
References basic::options::OptionKeys::dna::design::flush.
uLong zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::get_crc | ( | ) | const [inline] |
returns the crc of the input data compressed so far
uLong zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::get_in_size | ( | ) | const [inline] |
returns the size (bytes) of the input data compressed so far
ostream_reference zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::get_ostream | ( | ) | const [inline] |
returns a reference to the output stream
uLong zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::get_out_size | ( | ) | const [inline] |
returns the size (bytes) of the compressed data so far
int zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::get_zerr | ( | ) | const [inline] |
returns the latest zlib error status
basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::int_type zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::overflow | ( | int_type | c | ) |
OVERFLOW.
void zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::reset_state | ( | ) |
resets the zip stream and zeros the crc
This method should be called after flush_finalize() to allow future writes
int zlib_stream::basic_zip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::sync | ( | ) |