Rosetta
|
#include <zipstream.hpp>
Public Types | |
typedef basic_zip_istreambase< Elem, Tr, ElemA, ByteT, ByteAT > | zip_istreambase_type |
typedef std::basic_istream< Elem, Tr > | istream_type |
typedef std::basic_istream< Elem, Tr > & | istream_reference |
typedef Elem | char_type |
typedef unsigned char | byte_type |
![]() | |
typedef std::basic_istream< Elem, std::char_traits< Elem > > & | istream_reference |
typedef basic_unzip_streambuf< Elem, std::char_traits< Elem >, std::allocator< Elem >, unsigned char, std::allocator< unsigned char > > | unzip_streambuf_type |
Public Member Functions | |
basic_zip_istream (istream_reference istream_, size_t window_size_=15, size_t read_buffer_size_=default_buffer_size, size_t input_buffer_size_=default_buffer_size) | |
Construct a unzipper stream. More... | |
bool | is_gzip () const |
returns true if it is a gzip file More... | |
void | read_footer () |
reads the gzip footer More... | |
bool | check_crc () const |
return crc check result More... | |
bool | check_data_size () const |
return data size check More... | |
uLong | get_gzip_crc () const |
return the crc value in the file More... | |
uLong | get_gzip_data_size () const |
return the data size in the file More... | |
uLong | get_crc () const |
returns the uncompressed data crc More... | |
uLong | get_out_size () const |
returns the uncompressed data size More... | |
unzip_streambuf_type * | rdbuf () |
returns the underlying unzip istream object More... | |
![]() | |
basic_zip_istreambase (istream_reference ostream_, size_t window_size_, size_t read_buffer_size_, size_t input_buffer_size_) | |
unzip_streambuf_type * | rdbuf () |
returns the underlying unzip istream object More... | |
int | get_zerr () const |
returns the zlib error state More... | |
uLong | get_crc () const |
returns the uncompressed data crc More... | |
uLong | get_out_size () const |
returns the uncompressed data size More... | |
uLong | get_in_size () const |
returns the compressed data size More... | |
Protected Member Functions | |
int | check_header () |
Static Protected Member Functions | |
static void | read_uint32 (istream_reference in_, unsigned long &x_) |
Protected Attributes | |
bool | m_is_gzip |
uLong | m_gzip_crc |
uLong | m_gzip_data_size |
A zipper istream.
This class is a istream decorator that behaves 'almost' like any other ostream.
At construction, it takes any istream that shall be used to input of the compressed data.
Simlpe example:
typedef unsigned char zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::byte_type |
typedef Elem zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::char_type |
typedef std::basic_istream< Elem, Tr >& zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::istream_reference |
typedef std::basic_istream< Elem, Tr > zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::istream_type |
typedef basic_zip_istreambase< Elem, Tr, ElemA, ByteT, ByteAT > zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::zip_istreambase_type |
|
inline |
Construct a unzipper stream.
istream_ | input buffer |
window_size_ | |
read_buffer_size_ | |
input_buffer_size_ |
References zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::check_header(), zlib_stream::basic_zip_istreambase< Elem, std::char_traits< Elem >, std::allocator< Elem >, unsigned char, std::allocator< unsigned char > >::get_zerr(), and zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::rdbuf().
|
inline |
return crc check result
References zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::get_crc(), and zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::m_gzip_crc.
Referenced by utility::io::izstream::check_crc().
|
inline |
return data size check
References zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::get_out_size(), and zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::m_gzip_data_size.
|
protected |
References kmeans_adaptive_kernel_density_bb_dependent_rotlib::c, zlib_stream::detail::gz_comment, zlib_stream::detail::gz_extra_field, zlib_stream::detail::gz_head_crc, zlib_stream::detail::gz_magic, zlib_stream::detail::gz_orig_name, zlib_stream::detail::gz_reserved, enumerate_junctions::int, ObjexxFCL::len(), and basic::options::OptionKeys::sasa::method.
Referenced by zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::basic_zip_istream().
|
inline |
returns the uncompressed data crc
Referenced by zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::check_crc(), and utility::io::izstream::get_crc().
|
inline |
return the crc value in the file
References zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::m_gzip_crc.
|
inline |
return the data size in the file
References zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::m_gzip_data_size.
|
inline |
returns the uncompressed data size
Referenced by zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::check_data_size(), and utility::io::izstream::get_out_size().
|
inline |
returns true if it is a gzip file
References zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::m_is_gzip.
Referenced by utility::io::izstream::is_gzip(), utility::io::izstream::open(), and utility::io::izstream::seek_beg().
|
inline |
returns the underlying unzip istream object
Referenced by zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::basic_zip_istream().
void zlib_stream::basic_zip_istream< Elem, Tr, ElemA, ByteT, ByteAT >::read_footer |
reads the gzip footer
|
staticprotected |
References docking::b1, docking::b2, and docking::b3.
|
protected |
|
protected |
|
protected |