|
Rosetta
|
A stream decorator that takes compressed input and unzips it to a istream. More...
#include <zipstream.hpp>

Public Types | |
| typedef std::basic_streambuf< Elem, Tr > | basic_streambuf_type |
| typedef std::basic_istream< Elem, Tr > & | istream_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::int_type | int_type |
Public Member Functions | |
| basic_unzip_streambuf (istream_reference istream_, size_t window_size_, size_t read_buffer_size_, size_t input_buffer_size_) | |
| Construct an unzip stream. More... | |
| ~basic_unzip_streambuf () override | |
| int_type | underflow () override |
| istream_reference | get_istream () |
| returns the compressed input istream More... | |
| z_stream & | get_zip_stream () |
| returns the zlib stream structure More... | |
| int | get_zerr () const |
| returns the latest zlib error state More... | |
| uLong | get_crc () const |
| returns the crc of the uncompressed data so far More... | |
| uLong | get_out_size () const |
| returns the number of uncompressed bytes More... | |
| uLong | get_in_size () const |
| returns the number of read compressed bytes More... | |
Private Member Functions | |
| void | put_back_from_zip_stream () |
| std::streamsize | unzip_from_stream (char_type *, std::streamsize) |
| size_t | fill_input_buffer () |
Private Attributes | |
| istream_reference | m_istream |
| z_stream | m_zip_stream |
| int | m_err |
| byte_vector_type | m_input_buffer |
| char_vector_type | m_buffer |
| uLong | m_crc |
A stream decorator that takes compressed input and unzips it to a istream.
| typedef std::basic_streambuf< Elem, Tr > zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::basic_streambuf_type |
| typedef ByteAT zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_allocator_type |
| typedef byte_type* zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_buffer_type |
| typedef ByteT zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_type |
| typedef std::vector< byte_type, byte_allocator_type > zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_vector_type |
| typedef ElemA zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::char_allocator_type |
| typedef Elem zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::char_type |
| typedef std::vector< char_type, char_allocator_type > zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::char_vector_type |
| typedef Tr::int_type zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::int_type |
| typedef std::basic_istream< Elem, Tr >& zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::istream_reference |
| zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::basic_unzip_streambuf | ( | istream_reference | istream_, |
| size_t | window_size_, | ||
| size_t | read_buffer_size_, | ||
| size_t | input_buffer_size_ | ||
| ) |
Construct an unzip stream.
References zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::m_buffer, zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::m_err, and zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::m_zip_stream.
|
override |
|
private |
|
inline |
returns the crc of the uncompressed data so far
References zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::m_crc.
Referenced by zlib_stream::basic_zip_istreambase< Elem, Tr, ElemA, ByteT, ByteAT >::get_crc().
|
inline |
returns the number of read compressed bytes
References zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::m_zip_stream.
Referenced by zlib_stream::basic_zip_istreambase< Elem, Tr, ElemA, ByteT, ByteAT >::get_in_size().
|
inline |
returns the compressed input istream
References zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::m_istream.
|
inline |
returns the number of uncompressed bytes
References zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::m_zip_stream.
Referenced by zlib_stream::basic_zip_istreambase< Elem, Tr, ElemA, ByteT, ByteAT >::get_out_size().
|
inline |
returns the latest zlib error state
References zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::m_err.
Referenced by zlib_stream::basic_zip_istreambase< Elem, Tr, ElemA, ByteT, ByteAT >::get_zerr().
|
inline |
returns the zlib stream structure
References zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::m_zip_stream.
|
private |
|
override |
|
private |
References count.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::basic_unzip_streambuf(), zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::get_in_size(), zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::get_out_size(), and zlib_stream::basic_unzip_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::get_zip_stream().