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