1
#ifndef __INKSCAPE_IO_GZIPSTREAM_H__
2
#define __INKSCAPE_IO_GZIPSTREAM_H__
4
* Zlib-enabled input and output streams
6
* This is a thin wrapper of libz calls, in order
7
* to provide a simple interface to our developers
8
* for gzip input and output.
11
* Bob Jamison <rjamison@titan.com>
13
* Copyright (C) 2004 Inkscape.org
15
* Released under GNU GPL, read the file 'COPYING' for more information
19
#include "inkscapestream.h"
27
//#########################################################################
28
//# G Z I P I N P U T S T R E A M
29
//#########################################################################
32
* This class is for deflating a gzip-compressed InputStream source
35
class GzipInputStream : public BasicInputStream
40
GzipInputStream(InputStream &sourceStream);
42
virtual ~GzipInputStream();
44
virtual int available();
60
unsigned char *outputBuf;
61
unsigned char *srcBuf;
66
unsigned long srcConsumed;
72
}; // class GzipInputStream
77
//#########################################################################
78
//# G Z I P O U T P U T S T R E A M
79
//#########################################################################
82
* This class is for gzip-compressing data going to the
83
* destination OutputStream
86
class GzipOutputStream : public BasicOutputStream
91
GzipOutputStream(OutputStream &destinationStream);
93
virtual ~GzipOutputStream();
99
virtual void put(int ch);
103
std::vector<unsigned char> inputBuf;
109
}; // class GzipOutputStream
118
} // namespace Inkscape
121
#endif /* __INKSCAPE_IO_GZIPSTREAM_H__ */