]>
Commit | Line | Data |
---|---|---|
79c3e0e1 GL |
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 | ///////////////////////////////////////////////////////////////////////////// | |
34138703 JS |
11 | #ifndef _WX_WXZSTREAM_H__ |
12 | #define _WX_WXZSTREAM_H__ | |
79c3e0e1 | 13 | |
af49c4b8 GD |
14 | #if defined(__GNUG__) && !defined(__APPLE__) |
15 | #pragma interface "zstream.h" | |
79c3e0e1 GL |
16 | #endif |
17 | ||
124031d5 | 18 | #include "wx/defs.h" |
ac57418f | 19 | |
ce4169a4 | 20 | #if wxUSE_ZLIB && wxUSE_STREAMS |
ac57418f | 21 | |
ed58dbea | 22 | #include "wx/stream.h" |
79c3e0e1 | 23 | |
bddd7a8d | 24 | class WXDLLIMPEXP_BASE wxZlibInputStream: public wxFilterInputStream { |
79c3e0e1 GL |
25 | public: |
26 | wxZlibInputStream(wxInputStream& stream); | |
27 | virtual ~wxZlibInputStream(); | |
28 | ||
79c3e0e1 | 29 | protected: |
75ed1d15 | 30 | size_t OnSysRead(void *buffer, size_t size); |
1678ad78 GL |
31 | |
32 | protected: | |
79c3e0e1 GL |
33 | size_t m_z_size; |
34 | unsigned char *m_z_buffer; | |
856d2e52 | 35 | struct z_stream_s *m_inflate; |
22f3361e VZ |
36 | |
37 | DECLARE_NO_COPY_CLASS(wxZlibInputStream) | |
79c3e0e1 GL |
38 | }; |
39 | ||
bddd7a8d | 40 | class WXDLLIMPEXP_BASE wxZlibOutputStream: public wxFilterOutputStream { |
79c3e0e1 | 41 | public: |
5824f314 | 42 | wxZlibOutputStream(wxOutputStream& stream, int level = -1); |
79c3e0e1 GL |
43 | virtual ~wxZlibOutputStream(); |
44 | ||
1678ad78 | 45 | void Sync(); |
79c3e0e1 | 46 | |
79c3e0e1 | 47 | protected: |
75ed1d15 | 48 | size_t OnSysWrite(const void *buffer, size_t size); |
1678ad78 GL |
49 | |
50 | protected: | |
79c3e0e1 GL |
51 | size_t m_z_size; |
52 | unsigned char *m_z_buffer; | |
856d2e52 | 53 | struct z_stream_s *m_deflate; |
22f3361e VZ |
54 | |
55 | DECLARE_NO_COPY_CLASS(wxZlibOutputStream) | |
79c3e0e1 GL |
56 | }; |
57 | ||
58 | #endif | |
ce4169a4 | 59 | // wxUSE_ZLIB && wxUSE_STREAMS |
ac57418f RR |
60 | |
61 | #endif | |
cc985fac PA |
62 | // _WX_WXZSTREAM_H__ |
63 |