1
#ifndef __GZIPSTREAM_H__
2
#define __GZIPSTREAM_H__
4
* Zlib-enabled input and output streams
6
* This provides a simple mechanism for reading and
7
* writing Gzip files. We use our own 'ZipTool' class
8
* to accomplish this, avoiding a zlib dependency.
13
* Copyright (C) 2006 Bob Jamison
15
* This library is free software; you can redistribute it and/or
16
* modify it under the terms of the GNU Lesser General Public
17
* License as published by the Free Software Foundation; either
18
* version 2.1 of the License, or (at your option) any later version.
20
* This library is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
* Lesser General Public License for more details.
25
* You should have received a copy of the GNU Lesser General Public
26
* License along with this library; if not, write to the Free Software
27
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33
#include "domstream.h"
44
//#########################################################################
45
//# G Z I P I N P U T S T R E A M
46
//#########################################################################
49
* This class is for deflating a gzip-compressed InputStream source
52
class GzipInputStream : public BasicInputStream
57
GzipInputStream(InputStream &sourceStream);
59
virtual ~GzipInputStream();
61
virtual int available();
73
std::vector<unsigned char> buffer;
77
}; // class GzipInputStream
82
//#########################################################################
83
//# G Z I P O U T P U T S T R E A M
84
//#########################################################################
87
* This class is for gzip-compressing data going to the
88
* destination OutputStream
91
class GzipOutputStream : public BasicOutputStream
96
GzipOutputStream(OutputStream &destinationStream);
98
virtual ~GzipOutputStream();
100
virtual void close();
102
virtual void flush();
104
virtual void put(int ch);
108
std::vector<unsigned char> buffer;
111
}; // class GzipOutputStream
125
#endif /* __GZIPSTREAM_H__ */