]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/zstream.h
34bb20f6728f908bb532262efc0a0c2d33ba67d1
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Memory stream classes
4 // Author: Guilhem Lavaux
8 // Copyright: (c) Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __WXZSTREAM_H__
12 #define __WXZSTREAM_H__
18 #include <wx/stream.h>
21 class wxZlibInputStream
: public wxFilterInputStream
{
22 DECLARE_CLASS(wxZlibInputStream
)
24 wxZlibInputStream(wxInputStream
& stream
);
25 virtual ~wxZlibInputStream();
27 wxInputStream
& Read(void *buffer
, size_t size
);
28 off_t
SeekI(off_t pos
, wxSeekMode mode
= wxFromStart
);
31 size_t LastRead() const { return m_lastread
; }
37 unsigned char *m_z_buffer
;
39 struct z_stream_s m_inflate
;
42 class wxZlibOutputStream
: public wxFilterOutputStream
{
43 DECLARE_CLASS(wxZlibOutputStream
)
45 wxZlibOutputStream(wxOutputStream
& stream
);
46 virtual ~wxZlibOutputStream();
48 wxOutputStream
& Write(const void *buffer
, size_t size
);
49 off_t
SeekO(off_t pos
, wxSeekMode mode
= wxFromStart
);
52 size_t LastWrite() const { return m_lastwrite
; }
58 unsigned char *m_z_buffer
;
60 struct z_stream_s m_deflate
;