inflateinputstreambuf.h
Go to the documentation of this file.
#ifndef INFLATEINPUTSTREAMBUF_H
#define INFLATEINPUTSTREAMBUF_H
#include "zipios++/zipios-config.h"
#include "zipios++/meta-iostreams.h"
#include <vector>
#include <zlib.h>
#include "zipios++/filterinputstreambuf.h"
namespace zipios {
using std::vector ;
class InflateInputStreambuf : public FilterInputStreambuf {
public:
explicit InflateInputStreambuf( streambuf *inbuf, int s_pos = -1, bool del_inbuf = false ) ;
virtual ~InflateInputStreambuf() ;
bool reset( int stream_position = -1 ) ;
protected:
virtual int underflow() ;
private:
z_stream _zs ;
bool _zs_initialized ;
const int _invecsize ;
vector< char > _invec ;
protected: // FIXME: reconsider design?
const int _outvecsize ;
vector< char > _outvec ;
private:
InflateInputStreambuf( const InflateInputStreambuf &src ) ;
const InflateInputStreambuf &operator= ( const InflateInputStreambuf &src ) ;
};
} // namespace
#endif
/*
Zipios++ - a small C++ library that provides easy access to .zip files.
Copyright (C) 2000 Thomas Søndergaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
zipios::FilterInputStreambuf::FilterInputStreambuf
FilterInputStreambuf(streambuf *inbuf, bool del_inbuf=false)
Constructor.
Definition filterinputstreambuf.cpp:8
zipios::InflateInputStreambuf::reset
bool reset(int stream_position=-1)
Resets the zlib stream and purges input and output buffers.
Definition inflateinputstreambuf.cpp:117
zipios::InflateInputStreambuf::InflateInputStreambuf
InflateInputStreambuf(streambuf *inbuf, int s_pos=-1, bool del_inbuf=false)
InflateInputStreambuf constructor.
Definition inflateinputstreambuf.cpp:18
filterinputstreambuf.h
Header file that defines FilterInputStreambuf.