]> git.saurik.com Git - wxWidgets.git/blame - include/wx/zstream.h
Some more Motif work; included utils.h in fileconf.cpp (for wxGetHomeDir or something)
[wxWidgets.git] / include / wx / zstream.h
CommitLineData
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
GL
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include <wx/stream.h>
79c3e0e1
GL
19
20class wxZlibInputStream: public wxFilterInputStream {
79c3e0e1
GL
21 public:
22 wxZlibInputStream(wxInputStream& stream);
23 virtual ~wxZlibInputStream();
24
79c3e0e1
GL
25 bool Eof() const;
26
27 protected:
1678ad78 28 size_t DoRead(void *buffer, size_t size);
46dc76ba 29 off_t DoSeekInput(off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode)) { return wxInvalidOffset; }
1678ad78
GL
30 off_t DoTellInput() const { return wxInvalidOffset; }
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;
79c3e0e1
GL
36};
37
38class wxZlibOutputStream: public wxFilterOutputStream {
79c3e0e1
GL
39 public:
40 wxZlibOutputStream(wxOutputStream& stream);
41 virtual ~wxZlibOutputStream();
42
1678ad78 43 void Sync();
79c3e0e1 44
79c3e0e1
GL
45 bool Bad() const;
46
47 protected:
1678ad78 48 size_t DoWrite(const void *buffer, size_t size);
46dc76ba 49 off_t DoSeekOutput(off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode)) { return wxInvalidOffset; }
1678ad78
GL
50 off_t DoTellOutput() const { return wxInvalidOffset; }
51
52 protected:
79c3e0e1
GL
53 size_t m_z_size;
54 unsigned char *m_z_buffer;
856d2e52 55 struct z_stream_s *m_deflate;
79c3e0e1
GL
56};
57
58#endif