]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/strmzlib.tex
change configure to better detect gstreamer. Check create is valid in mediaplayer...
[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
301deecc 33The {\it flags} wxZLIB\_ZLIB and wxZLIB\_GZIP specify whether the input data
4c68a102 34is in zlib or gzip format. If wxZLIB\_AUTO is used, then zlib will
301deecc 35autodetect the stream type, this is the default.
4c68a102
VS
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,
dbd94b75
KH
45there is a compatibility mode, which is switched on by passing
46wxZLIB\_24COMPATIBLE for flags. Note that in when operating in compatibility
4c68a102
VS
47mode error checking is very much reduced.
48%endif
0915d0b2 49
301deecc 50The following symbols can be use for the flags:
0915d0b2
VZ
51
52\begin{verbatim}
53// Flags
54enum {
4c68a102
VS
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
301deecc 62};
0915d0b2
VZ
63\end{verbatim}
64
4c68a102
VS
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.
631f1bfe 70
631f1bfe
JS
71% -----------------------------------------------------------------------------
72% wxZlibOutputStream
73% -----------------------------------------------------------------------------
750b78ba 74\section{\class{wxZlibOutputStream}}\label{wxzliboutputstream}
631f1bfe 75
301deecc
RN
76This stream compresses all data written to it. The compressed output can be
77in zlib or gzip format.
4c68a102 78Note that writing the gzip format requires zlib version 1.2.1 or greater
dbd94b75 79(the builtin version does support gzip format).
36edded9 80
0915d0b2
VZ
81The stream is not seekable, \helpref{SeekO()}{wxoutputstreamseeko} returns
82 {\it wxInvalidOffset}.
83
631f1bfe
JS
84\wxheading{Derived from}
85
86\helpref{wxFilterOutputStream}{wxfilteroutputstream}
87
954b8ae6
JS
88\wxheading{Include files}
89
90<wx/zstream.h>
91
631f1bfe
JS
92\wxheading{See also}
93
0915d0b2
VZ
94\helpref{wxOutputStream}{wxoutputstream},
95 \helpref{wxZlibInputStream}{wxzlibinputstream}
631f1bfe 96
5824f314
VS
97
98\latexignore{\rtfignore{\wxheading{Members}}}
99
6d06e061 100\membersection{wxZlibOutputStream::wxZlibOutputStream}\label{wxzliboutputstreamwxzliboutputstream}
5824f314 101
301deecc 102\func{}{wxZlibOutputStream}{\param{wxOutputStream\&}{ stream}, \param{int}{ level = -1}, \param{int}{ flags = wxZLIB\_ZLIB}}
5824f314
VS
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).
0915d0b2 108
301deecc
RN
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.
4c68a102
VS
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.
0915d0b2
VZ
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
301deecc 126};
0915d0b2
VZ
127
128// Flags
129enum {
301deecc
RN
130 wxZLIB_NO_HEADER = 0, // raw deflate stream, no header or checksum
131 wxZLIB_ZLIB = 1, // zlib header and checksum
4c68a102 132 wxZLIB_GZIP = 2 // gzip header and checksum, requires zlib 1.2.1+
301deecc 133};
0915d0b2
VZ
134\end{verbatim}
135
4c68a102
VS
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