]> git.saurik.com Git - wxWidgets.git/blob - include/wx/zstream.h
* Renamed fstream.h in wfstream.h
[wxWidgets.git] / include / wx / zstream.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: zstream.h
3 // Purpose: Memory stream classes
4 // Author: Guilhem Lavaux
5 // Modified by:
6 // Created: 11/07/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_WXZSTREAM_H__
12 #define _WX_WXZSTREAM_H__
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include <wx/stream.h>
19
20 class WXDLLEXPORT wxZlibInputStream: public wxFilterInputStream {
21 public:
22 wxZlibInputStream(wxInputStream& stream);
23 virtual ~wxZlibInputStream();
24
25 protected:
26 size_t OnSysRead(void *buffer, size_t size);
27
28 protected:
29 size_t m_z_size;
30 unsigned char *m_z_buffer;
31 struct z_stream_s *m_inflate;
32 };
33
34 class WXDLLEXPORT wxZlibOutputStream: public wxFilterOutputStream {
35 public:
36 wxZlibOutputStream(wxOutputStream& stream);
37 virtual ~wxZlibOutputStream();
38
39 void Sync();
40
41 protected:
42 size_t OnSysWrite(const void *buffer, size_t size);
43
44 protected:
45 size_t m_z_size;
46 unsigned char *m_z_buffer;
47 struct z_stream_s *m_deflate;
48 };
49
50 #endif