]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/strmzlib.tex
made wxADJUST_MINSIZE default
[wxWidgets.git] / docs / latex / wx / strmzlib.tex
CommitLineData
631f1bfe
JS
1% -----------------------------------------------------------------------------
2% wxZlibInputStream
3% -----------------------------------------------------------------------------
750b78ba 4\section{\class{wxZlibInputStream}}\label{wxzlibinputstream}
631f1bfe 5
301deecc
RN
6This filter stream decompresses a stream that is in zlib or gzip format.
7Note that reading the gzip format requires zlib version 1.2.0 greater.
36edded9 8
0915d0b2
VZ
9The stream is not seekable, \helpref{SeekI()}{wxinputstreamseeki} returns
10 {\it wxInvalidOffset}. Also \helpref{GetSize()}{wxstreambasegetsize} is
11not supported, it always returns $0$.
12
631f1bfe
JS
13\wxheading{Derived from}
14
15\helpref{wxFilterInputStream}{wxfilterinputstream}
16
954b8ae6
JS
17\wxheading{Include files}
18
19<wx/zstream.h>
20
631f1bfe
JS
21\wxheading{See also}
22
0915d0b2
VZ
23\helpref{wxInputStream}{wxinputstream},
24 \helpref{wxZlibOutputStream}{wxzliboutputstream}.
25
26\latexignore{\rtfignore{\wxheading{Members}}}
27
28\membersection{wxZlibInputStream::wxZlibInputStream}
29
301deecc 30\func{}{wxZlibInputStream}{\param{wxInputStream\&}{ stream}, \param{int}{ flags = wxZLIB\_ZLIB | wxZLIB\_GZIP}}
0915d0b2 31
301deecc
RN
32The {\it flags} wxZLIB\_ZLIB and wxZLIB\_GZIP specify whether the input data
33is in zlib or gzip format. If both are used, bitwise ored, then zlib will
34autodetect the stream type, this is the default.
35If {\it flags} is zero, then the data is assumed to be a raw deflate stream
36without either zlib or gzip headers.
0915d0b2 37
301deecc 38The following symbols can be use for the flags:
0915d0b2
VZ
39
40\begin{verbatim}
41// Flags
42enum {
301deecc
RN
43 wxZLIB_NO_HEADER = 0, // raw deflate stream, no header or checksum
44 wxZLIB_ZLIB = 1, // zlib header and checksum
45 wxZLIB_GZIP = 2 // gzip header and checksum, requires zlib 1.2+
46};
0915d0b2
VZ
47\end{verbatim}
48
631f1bfe 49
631f1bfe
JS
50% -----------------------------------------------------------------------------
51% wxZlibOutputStream
52% -----------------------------------------------------------------------------
750b78ba 53\section{\class{wxZlibOutputStream}}\label{wxzliboutputstream}
631f1bfe 54
301deecc
RN
55This stream compresses all data written to it. The compressed output can be
56in zlib or gzip format.
57Note that writing the gzip format requires zlib version 1.2.0 greater.
36edded9 58
0915d0b2
VZ
59The stream is not seekable, \helpref{SeekO()}{wxoutputstreamseeko} returns
60 {\it wxInvalidOffset}.
61
631f1bfe
JS
62\wxheading{Derived from}
63
64\helpref{wxFilterOutputStream}{wxfilteroutputstream}
65
954b8ae6
JS
66\wxheading{Include files}
67
68<wx/zstream.h>
69
631f1bfe
JS
70\wxheading{See also}
71
0915d0b2
VZ
72\helpref{wxOutputStream}{wxoutputstream},
73 \helpref{wxZlibInputStream}{wxzlibinputstream}
631f1bfe 74
5824f314
VS
75
76\latexignore{\rtfignore{\wxheading{Members}}}
77
78\membersection{wxZlibOutputStream::wxZlibOutputStream}
79
301deecc 80\func{}{wxZlibOutputStream}{\param{wxOutputStream\&}{ stream}, \param{int}{ level = -1}, \param{int}{ flags = wxZLIB\_ZLIB}}
5824f314
VS
81
82Creates a new write-only compressed stream. {\it level} means level of
83compression. It is number between 0 and 9 (including these values) where
840 means no compression and 9 best but slowest compression. -1 is default
85value (currently equivalent to 6).
0915d0b2 86
301deecc
RN
87The {\it flags} wxZLIB\_ZLIB and wxZLIB\_GZIP specify whether the output data
88will be in zlib or gzip format. wxZLIB\_ZLIB is the default.
89If {\it flags} is zero, then a raw deflate stream is output without either
90zlib or gzip headers.
0915d0b2
VZ
91
92The following symbols can be use for the compression level and flags:
93
94\begin{verbatim}
95// Compression level
96enum {
97 wxZ_DEFAULT_COMPRESSION = -1,
98 wxZ_NO_COMPRESSION = 0,
99 wxZ_BEST_SPEED = 1,
100 wxZ_BEST_COMPRESSION = 9
301deecc 101};
0915d0b2
VZ
102
103// Flags
104enum {
301deecc
RN
105 wxZLIB_NO_HEADER = 0, // raw deflate stream, no header or checksum
106 wxZLIB_ZLIB = 1, // zlib header and checksum
107 wxZLIB_GZIP = 2 // gzip header and checksum, requires zlib 1.2+
108};
0915d0b2
VZ
109\end{verbatim}
110