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