]> git.saurik.com Git - wxWidgets.git/blob - include/wx/zstream.h
added MSLU reference to wxUSE_UNICODE
[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 #if defined(__GNUG__) && !defined(__APPLE__)
15 #pragma interface "zstream.h"
16 #endif
17
18 #include "wx/defs.h"
19
20 #if wxUSE_ZLIB && wxUSE_STREAMS
21
22 #include "wx/stream.h"
23
24 class WXDLLEXPORT wxZlibInputStream: public wxFilterInputStream {
25 public:
26 wxZlibInputStream(wxInputStream& stream);
27 virtual ~wxZlibInputStream();
28
29 protected:
30 size_t OnSysRead(void *buffer, size_t size);
31
32 protected:
33 size_t m_z_size;
34 unsigned char *m_z_buffer;
35 struct z_stream_s *m_inflate;
36
37 DECLARE_NO_COPY_CLASS(wxZlibInputStream)
38 };
39
40 class WXDLLEXPORT wxZlibOutputStream: public wxFilterOutputStream {
41 public:
42 wxZlibOutputStream(wxOutputStream& stream, int level = -1);
43 virtual ~wxZlibOutputStream();
44
45 void Sync();
46
47 protected:
48 size_t OnSysWrite(const void *buffer, size_t size);
49
50 protected:
51 size_t m_z_size;
52 unsigned char *m_z_buffer;
53 struct z_stream_s *m_deflate;
54
55 DECLARE_NO_COPY_CLASS(wxZlibOutputStream)
56 };
57
58 #endif
59 // wxUSE_ZLIB && wxUSE_STREAMS
60
61 #endif
62 // _WX_WXZSTREAM_H__
63