]>
Commit | Line | Data |
---|---|---|
631f1bfe JS |
1 | % ----------------------------------------------------------------------------- |
2 | % wxZlibInputStream | |
3 | % ----------------------------------------------------------------------------- | |
750b78ba | 4 | \section{\class{wxZlibInputStream}}\label{wxzlibinputstream} |
631f1bfe | 5 | |
36edded9 JS |
6 | This stream uncompresses all data read from it. It uses the "filtered" |
7 | stream to get new compressed data. | |
8 | ||
0915d0b2 VZ |
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 | ||
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 | ||
30 | \func{}{wxZlibInputStream}{\param{wxInputStream\&}{ stream}, \param{int}{ flags = 0}} | |
31 | ||
32 | {\it flags} should be omitted for normal usage. The flag {\it wxZLIB\_NO_HEADER} | |
33 | is needed when wxZlibInputStream is used as an 'inflate' decompressor for gzip | |
34 | or zip files. | |
35 | ||
36 | {\it wxZLIB\_NO_HEADER} is currently the only flag: | |
37 | ||
38 | \begin{verbatim} | |
39 | // Flags | |
40 | enum { | |
41 | wxZLIB_NO_HEADER = 1 // required for use in Gzip and Zip files | |
42 | } | |
43 | \end{verbatim} | |
44 | ||
631f1bfe | 45 | |
631f1bfe JS |
46 | % ----------------------------------------------------------------------------- |
47 | % wxZlibOutputStream | |
48 | % ----------------------------------------------------------------------------- | |
750b78ba | 49 | \section{\class{wxZlibOutputStream}}\label{wxzliboutputstream} |
631f1bfe | 50 | |
36edded9 | 51 | This stream compresses all data written to it, and passes the compressed data |
330d6fd0 | 52 | to the "filtered" stream. |
36edded9 | 53 | |
0915d0b2 VZ |
54 | The stream is not seekable, \helpref{SeekO()}{wxoutputstreamseeko} returns |
55 | {\it wxInvalidOffset}. | |
56 | ||
631f1bfe JS |
57 | \wxheading{Derived from} |
58 | ||
59 | \helpref{wxFilterOutputStream}{wxfilteroutputstream} | |
60 | ||
954b8ae6 JS |
61 | \wxheading{Include files} |
62 | ||
63 | <wx/zstream.h> | |
64 | ||
631f1bfe JS |
65 | \wxheading{See also} |
66 | ||
0915d0b2 VZ |
67 | \helpref{wxOutputStream}{wxoutputstream}, |
68 | \helpref{wxZlibInputStream}{wxzlibinputstream} | |
631f1bfe | 69 | |
5824f314 VS |
70 | |
71 | \latexignore{\rtfignore{\wxheading{Members}}} | |
72 | ||
73 | \membersection{wxZlibOutputStream::wxZlibOutputStream} | |
74 | ||
0915d0b2 | 75 | \func{}{wxZlibOutputStream}{\param{wxOutputStream\&}{ stream}, \param{int}{ level = -1}, \param{int}{ flags = 0}} |
5824f314 VS |
76 | |
77 | Creates a new write-only compressed stream. {\it level} means level of | |
78 | compression. It is number between 0 and 9 (including these values) where | |
79 | 0 means no compression and 9 best but slowest compression. -1 is default | |
80 | value (currently equivalent to 6). | |
0915d0b2 VZ |
81 | |
82 | {\it flags} should be omitted for normal usage. The flag {\it wxZLIB\_NO_HEADER} | |
83 | suppresses the generation of the zlib header and checksum, and is required | |
84 | when wxZlibOutputStream is used as a 'deflate' compressor for gzip or zip files. | |
85 | ||
86 | The following symbols can be use for the compression level and flags: | |
87 | ||
88 | \begin{verbatim} | |
89 | // Compression level | |
90 | enum { | |
91 | wxZ_DEFAULT_COMPRESSION = -1, | |
92 | wxZ_NO_COMPRESSION = 0, | |
93 | wxZ_BEST_SPEED = 1, | |
94 | wxZ_BEST_COMPRESSION = 9 | |
95 | } | |
96 | ||
97 | // Flags | |
98 | enum { | |
99 | wxZLIB_NO_HEADER = 1 // required for use in Gzip and Zip files | |
100 | } | |
101 | \end{verbatim} | |
102 |