- m_inflate.next_out = (unsigned char *)buffer;
- m_inflate.avail_out = size;
- m_eof = FALSE;
-
- while (m_inflate.avail_out > 0) {
- if (m_inflate.avail_in == 0) {
- wxFilterInputStream::Read(m_z_buffer, m_z_size);
- m_inflate.next_in = m_z_buffer;
- m_inflate.avail_in = wxFilterInputStream::LastRead();
- if (wxFilterInputStream::Eof()) {
- m_lastread = size - m_inflate.avail_out;
- return *this;
- }
- }
- err = inflate(&m_inflate, Z_FINISH);
- if (err == Z_STREAM_END) {
- m_lastread = size - m_inflate.avail_out;
- m_eof = TRUE;
- return *this;
- }
- }