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