102 int const err(inflateEnd(&
m_zs));
107 msgs <<
"InflateInputStreambuf::~InflateInputStreambuf(): inflateEnd() failed"
108 <<
": " << zError(err);
113 std::cerr << msgs.str() << std::endl;
136 return traits_type::to_int_type(*gptr());
141 m_zs.next_out =
reinterpret_cast<unsigned char *
>(&
m_outvec[0]);
146 while(
m_zs.avail_out > 0 && err == Z_OK)
148 if(
m_zs.avail_in == 0)
155 m_zs.next_in =
reinterpret_cast<unsigned char *
>(&
m_invec[0]);
163 err = inflate(&
m_zs, Z_NO_FLUSH);
180 if(err != Z_OK && err != Z_STREAM_END)
183 msgs <<
"InflateInputStreambuf::underflow(): inflate failed"
184 <<
": " << zError(err);
190 if(inflated_bytes > 0)
192 return traits_type::to_int_type(*gptr());
195 return traits_type::eof();
217 if(stream_position >= 0)
220 m_inbuf->pubseekpos(stream_position);
225 m_zs.next_in =
reinterpret_cast<Bytef *
>(&
m_invec[0]);
232 err = inflateReset(&
m_zs);
237 err = inflateInit2(&
m_zs, -MAX_WBITS);
Various exceptions used throughout the Zipios++ library, all based on zipios::Exception.
An IOException is used to signal an I/O error.
Various functions used throughout the library.
std::ostringstream OutputStringStream
An output stream using strings.