]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/zstream.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Memory stream classes
4 // Author: Guilhem Lavaux
8 // Copyright: (c) Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_WXZSTREAM_H__
12 #define _WX_WXZSTREAM_H__
18 #include <wx/stream.h>
19 #include "../zlib/zlib.h"
21 class wxZlibInputStream
: public wxFilterInputStream
{
23 wxZlibInputStream(wxInputStream
& stream
);
24 virtual ~wxZlibInputStream();
29 size_t DoRead(void *buffer
, size_t size
);
30 off_t
DoSeekInput(off_t
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
)) { return wxInvalidOffset
; }
31 off_t
DoTellInput() const { return wxInvalidOffset
; }
35 unsigned char *m_z_buffer
;
36 struct z_stream_s m_inflate
;
39 class wxZlibOutputStream
: public wxFilterOutputStream
{
41 wxZlibOutputStream(wxOutputStream
& stream
);
42 virtual ~wxZlibOutputStream();
49 size_t DoWrite(const void *buffer
, size_t size
);
50 off_t
DoSeekOutput(off_t
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
)) { return wxInvalidOffset
; }
51 off_t
DoTellOutput() const { return wxInvalidOffset
; }
55 unsigned char *m_z_buffer
;
56 struct z_stream_s m_deflate
;