Main Page   Class Hierarchy   Compound List   File List   Compound Members  

inflateinputstreambuf.h

Go to the documentation of this file.
00001 #ifndef INFLATEINPUTSTREAMBUF_H
00002 #define INFLATEINPUTSTREAMBUF_H
00003 
00004 #include "zipios++/zipios-config.h"
00005 
00006 #include "zipios++/meta-iostreams.h"
00007 #include <vector>
00008 
00009 #include <zlib.h>
00010 
00011 #include "zipios++/filterinputstreambuf.h"
00012 
00013 namespace zipios {
00014 
00015 using std::vector ;
00016 
00022 class InflateInputStreambuf : public FilterInputStreambuf {
00023 public:
00031   explicit InflateInputStreambuf( streambuf *inbuf, int s_pos = -1, bool del_inbuf = false ) ;
00032   virtual ~InflateInputStreambuf() ;
00033 
00039   bool reset( int stream_position = -1 ) ;
00040 protected:
00041   virtual int underflow() ;
00042 private:
00043   z_stream _zs ;
00044   bool _zs_initialized ;
00045   const int _invecsize ;
00046   vector< char > _invec ;
00047 protected: // FIXME: reconsider design?
00048   const int _outvecsize ;
00049   vector< char > _outvec ;
00050 
00051 private:
00052 
00054   InflateInputStreambuf( const InflateInputStreambuf &src ) ;
00055 
00057   const InflateInputStreambuf &operator= ( const InflateInputStreambuf &src ) ;
00058 
00059 };
00060 
00061 
00062 } // namespace
00063 
00064 
00065 
00066 #endif
00067 
00072 /*
00073   Zipios++ - a small C++ library that provides easy access to .zip files.
00074   Copyright (C) 2000  Thomas Søndergaard
00075   
00076   This library is free software; you can redistribute it and/or
00077   modify it under the terms of the GNU Lesser General Public
00078   License as published by the Free Software Foundation; either
00079   version 2 of the License, or (at your option) any later version.
00080   
00081   This library is distributed in the hope that it will be useful,
00082   but WITHOUT ANY WARRANTY; without even the implied warranty of
00083   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00084   Lesser General Public License for more details.
00085   
00086   You should have received a copy of the GNU Lesser General Public
00087   License along with this library; if not, write to the Free Software
00088   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00089 */

Generated at Tue Aug 14 20:39:26 2001 for Zipios++ by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000