]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/strmzlib.tex
better documentation for wxWindow::SetSizerAndFit()
[wxWidgets.git] / docs / latex / wx / strmzlib.tex
CommitLineData
631f1bfe
JS
1% -----------------------------------------------------------------------------
2% wxZlibInputStream
3% -----------------------------------------------------------------------------
750b78ba 4\section{\class{wxZlibInputStream}}\label{wxzlibinputstream}
631f1bfe 5
301deecc 6This filter stream decompresses a stream that is in zlib or gzip format.
4c68a102 7Note that reading the gzip format requires zlib version 1.2.1 or greater,
dbd94b75 8(the builtin version does support gzip format).
36edded9 9
0915d0b2
VZ
10The stream is not seekable, \helpref{SeekI()}{wxinputstreamseeki} returns
11 {\it wxInvalidOffset}. Also \helpref{GetSize()}{wxstreambasegetsize} is
12not supported, it always returns $0$.
13
631f1bfe
JS
14\wxheading{Derived from}
15
7376079d
VZ
16\helpref{wxFilterInputStream}{wxfilterinputstream}\\
17\helpref{wxInputStream}{wxinputstream}\\
18\helpref{wxStreamBase}{wxstreambase}
631f1bfe 19
954b8ae6
JS
20\wxheading{Include files}
21
22<wx/zstream.h>
23
a7af285d
VZ
24\wxheading{Library}
25
26\helpref{wxBase}{librarieslist}
27
631f1bfe
JS
28\wxheading{See also}
29
0915d0b2
VZ
30\helpref{wxInputStream}{wxinputstream},
31 \helpref{wxZlibOutputStream}{wxzliboutputstream}.
32
33\latexignore{\rtfignore{\wxheading{Members}}}
34
6d06e061 35\membersection{wxZlibInputStream::wxZlibInputStream}\label{wxzlibinputstreamwxzlibinputstream}
0915d0b2 36
4c68a102 37\func{}{wxZlibInputStream}{\param{wxInputStream\&}{ stream}, \param{int}{ flags = wxZLIB\_AUTO}}
0915d0b2 38
716b1f70
MW
39\func{}{wxZlibInputStream}{\param{wxInputStream*}{ stream}, \param{int}{ flags = wxZLIB\_AUTO}}
40
41If the parent stream is passed as a pointer then the new filter stream
42takes ownership of it. If it is passed by reference then it does not.
43
301deecc 44The {\it flags} wxZLIB\_ZLIB and wxZLIB\_GZIP specify whether the input data
4c68a102 45is in zlib or gzip format. If wxZLIB\_AUTO is used, then zlib will
301deecc 46autodetect the stream type, this is the default.
4c68a102
VS
47
48If {\it flags} is wxZLIB\_NO\_HEADER, then the data is assumed to be a raw
49deflate stream without either zlib or gzip headers. This is a lower level
50mode, which is not usually used directly. It can be used to read a raw
51deflate stream embedded in a higher level protocol.
52
53%if WXWIN_COMPATIBILITY_2_4
54This version is not by default compatible with the output produced by
55the version of {\it wxZlibOutputStream} in wxWidgets 2.4.x. However,
dbd94b75
KH
56there is a compatibility mode, which is switched on by passing
57wxZLIB\_24COMPATIBLE for flags. Note that in when operating in compatibility
4c68a102
VS
58mode error checking is very much reduced.
59%endif
0915d0b2 60
301deecc 61The following symbols can be use for the flags:
0915d0b2
VZ
62
63\begin{verbatim}
64// Flags
65enum {
4c68a102
VS
66#if WXWIN_COMPATIBILITY_2_4
67 wxZLIB_24COMPATIBLE = 4, // read v2.4.x data without error
68#endif
69 wxZLIB_NO_HEADER = 0, // raw deflate stream, no header or checksum
70 wxZLIB_ZLIB = 1, // zlib header and checksum
71 wxZLIB_GZIP = 2, // gzip header and checksum, requires zlib 1.2.1+
72 wxZLIB_AUTO = 3 // autodetect header zlib or gzip
301deecc 73};
0915d0b2
VZ
74\end{verbatim}
75
4c68a102
VS
76\membersection{wxZlibInputStream::CanHandleGZip}\label{wxzlibinputstreamcanhandlegzip}
77
78\func{static bool}{CanHandleGZip}{\void}
79
80Returns true if zlib library in use can handle gzip compressed data.
631f1bfe 81
631f1bfe
JS
82% -----------------------------------------------------------------------------
83% wxZlibOutputStream
84% -----------------------------------------------------------------------------
750b78ba 85\section{\class{wxZlibOutputStream}}\label{wxzliboutputstream}
631f1bfe 86
301deecc
RN
87This stream compresses all data written to it. The compressed output can be
88in zlib or gzip format.
4c68a102 89Note that writing the gzip format requires zlib version 1.2.1 or greater
dbd94b75 90(the builtin version does support gzip format).
36edded9 91
0915d0b2
VZ
92The stream is not seekable, \helpref{SeekO()}{wxoutputstreamseeko} returns
93 {\it wxInvalidOffset}.
94
631f1bfe
JS
95\wxheading{Derived from}
96
7376079d
VZ
97\helpref{wxFilterOutputStream}{wxfilteroutputstream}\\
98\helpref{wxOutputStream}{wxoutputstream}\\
99\helpref{wxStreamBase}{wxstreambase}
631f1bfe 100
954b8ae6
JS
101\wxheading{Include files}
102
103<wx/zstream.h>
104
a7af285d
VZ
105\wxheading{Library}
106
107\helpref{wxBase}{librarieslist}
108
631f1bfe
JS
109\wxheading{See also}
110
0915d0b2
VZ
111\helpref{wxOutputStream}{wxoutputstream},
112 \helpref{wxZlibInputStream}{wxzlibinputstream}
631f1bfe 113
5824f314
VS
114
115\latexignore{\rtfignore{\wxheading{Members}}}
116
6d06e061 117\membersection{wxZlibOutputStream::wxZlibOutputStream}\label{wxzliboutputstreamwxzliboutputstream}
5824f314 118
301deecc 119\func{}{wxZlibOutputStream}{\param{wxOutputStream\&}{ stream}, \param{int}{ level = -1}, \param{int}{ flags = wxZLIB\_ZLIB}}
5824f314 120
716b1f70
MW
121\func{}{wxZlibOutputStream}{\param{wxOutputStream*}{ stream}, \param{int}{ level = -1}, \param{int}{ flags = wxZLIB\_ZLIB}}
122
5824f314
VS
123Creates a new write-only compressed stream. {\it level} means level of
124compression. It is number between 0 and 9 (including these values) where
1250 means no compression and 9 best but slowest compression. -1 is default
126value (currently equivalent to 6).
0915d0b2 127
716b1f70
MW
128If the parent stream is passed as a pointer then the new filter stream
129takes ownership of it. If it is passed by reference then it does not.
130
301deecc
RN
131The {\it flags} wxZLIB\_ZLIB and wxZLIB\_GZIP specify whether the output data
132will be in zlib or gzip format. wxZLIB\_ZLIB is the default.
4c68a102
VS
133
134If {\it flags} is wxZLIB\_NO\_HEADER, then a raw deflate stream is output
135without either zlib or gzip headers. This is a lower level
136mode, which is not usually used directly. It can be used to embed a raw
137deflate stream in a higher level protocol.
0915d0b2
VZ
138
139The following symbols can be use for the compression level and flags:
140
141\begin{verbatim}
142// Compression level
143enum {
144 wxZ_DEFAULT_COMPRESSION = -1,
145 wxZ_NO_COMPRESSION = 0,
146 wxZ_BEST_SPEED = 1,
147 wxZ_BEST_COMPRESSION = 9
301deecc 148};
0915d0b2
VZ
149
150// Flags
151enum {
301deecc
RN
152 wxZLIB_NO_HEADER = 0, // raw deflate stream, no header or checksum
153 wxZLIB_ZLIB = 1, // zlib header and checksum
4c68a102 154 wxZLIB_GZIP = 2 // gzip header and checksum, requires zlib 1.2.1+
301deecc 155};
0915d0b2
VZ
156\end{verbatim}
157
4c68a102
VS
158\membersection{wxZlibOutputStream::CanHandleGZip}\label{wxoutputstreamcanhandlegzip}
159
160\func{static bool}{CanHandleGZip}{\void}
161
162Returns true if zlib library in use can handle gzip compressed data.
163