Zipios++
inflateinputstreambuf.h
Go to the documentation of this file.
1 #ifndef INFLATEINPUTSTREAMBUF_H
2 #define INFLATEINPUTSTREAMBUF_H
3 
4 #include "zipios++/zipios-config.h"
5 
6 #include "zipios++/meta-iostreams.h"
7 #include <vector>
8 
9 #include <zlib.h>
10 
12 
13 namespace zipios {
14 
15 using std::vector ;
16 
23 public:
31  explicit InflateInputStreambuf( streambuf *inbuf, int s_pos = -1, bool del_inbuf = false ) ;
32  virtual ~InflateInputStreambuf() ;
33 
39  bool reset( int stream_position = -1 ) ;
40 protected:
41  virtual int underflow() ;
42 private:
43  z_stream _zs ;
44  bool _zs_initialized ;
45  const int _invecsize ;
46  vector< char > _invec ;
47 protected: // FIXME: reconsider design?
48  const int _outvecsize ;
49  vector< char > _outvec ;
50 
51 private:
52 
55 
57  const InflateInputStreambuf &operator= ( const InflateInputStreambuf &src ) ;
58 
59 };
60 
61 
62 } // namespace
63 
64 
65 
66 #endif
67 
72 /*
73  Zipios++ - a small C++ library that provides easy access to .zip files.
74  Copyright (C) 2000 Thomas Søndergaard
75 
76  This library is free software; you can redistribute it and/or
77  modify it under the terms of the GNU Lesser General Public
78  License as published by the Free Software Foundation; either
79  version 2 of the License, or (at your option) any later version.
80 
81  This library is distributed in the hope that it will be useful,
82  but WITHOUT ANY WARRANTY; without even the implied warranty of
83  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
84  Lesser General Public License for more details.
85 
86  You should have received a copy of the GNU Lesser General Public
87  License along with this library; if not, write to the Free Software
88  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
89 */
An input streambuf filter is a streambuf that filters the input it gets from the streambuf it is atta...
InflateInputStreambuf is an input stream filter, that inflates the input from the attached input stre...
bool reset(int stream_position=-1)
Resets the zlib stream and purges input and output buffers.
InflateInputStreambuf(streambuf *inbuf, int s_pos=-1, bool del_inbuf=false)
InflateInputStreambuf constructor.
Header file that defines FilterInputStreambuf.