1 % -----------------------------------------------------------------------------
3 % -----------------------------------------------------------------------------
4 \section{\class{wxZlibInputStream
}}\label{wxzlibinputstream
}
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.1 or greater,
8 (the builtin version does support gzip format).
10 The stream is not seekable,
\helpref{SeekI()
}{wxinputstreamseeki
} returns
11 {\it wxInvalidOffset
}. Also
\helpref{GetSize()
}{wxstreambasegetsize
} is
12 not supported, it always returns $
0$.
14 \wxheading{Derived from
}
16 \helpref{wxFilterInputStream
}{wxfilterinputstream
}
18 \wxheading{Include files
}
24 \helpref{wxBase
}{librarieslist
}
28 \helpref{wxInputStream
}{wxinputstream
},
29 \helpref{wxZlibOutputStream
}{wxzliboutputstream
}.
31 \latexignore{\rtfignore{\wxheading{Members
}}}
33 \membersection{wxZlibInputStream::wxZlibInputStream
}\label{wxzlibinputstreamwxzlibinputstream
}
35 \func{}{wxZlibInputStream
}{\param{wxInputStream\&
}{ stream
},
\param{int
}{ flags = wxZLIB
\_AUTO}}
37 \func{}{wxZlibInputStream
}{\param{wxInputStream*
}{ stream
},
\param{int
}{ flags = wxZLIB
\_AUTO}}
39 If the parent stream is passed as a pointer then the new filter stream
40 takes ownership of it. If it is passed by reference then it does not.
42 The
{\it flags
} wxZLIB
\_ZLIB and wxZLIB
\_GZIP specify whether the input data
43 is in zlib or gzip format. If wxZLIB
\_AUTO is used, then zlib will
44 autodetect the stream type, this is the default.
46 If
{\it flags
} is wxZLIB
\_NO\_HEADER, then the data is assumed to be a raw
47 deflate stream without either zlib or gzip headers. This is a lower level
48 mode, which is not usually used directly. It can be used to read a raw
49 deflate stream embedded in a higher level protocol.
51 %if WXWIN_COMPATIBILITY_2_4
52 This version is not by default compatible with the output produced by
53 the version of
{\it wxZlibOutputStream
} in wxWidgets
2.4.x. However,
54 there is a compatibility mode, which is switched on by passing
55 wxZLIB
\_24COMPATIBLE for flags. Note that in when operating in compatibility
56 mode error checking is very much reduced.
59 The following symbols can be use for the flags:
64 #if WXWIN_COMPATIBILITY_2_4
65 wxZLIB_24COMPATIBLE =
4, // read v2.4.x data without error
67 wxZLIB_NO_HEADER =
0, // raw deflate stream, no header or checksum
68 wxZLIB_ZLIB =
1, // zlib header and checksum
69 wxZLIB_GZIP =
2, // gzip header and checksum, requires zlib
1.2.1+
70 wxZLIB_AUTO =
3 // autodetect header zlib or gzip
74 \membersection{wxZlibInputStream::CanHandleGZip
}\label{wxzlibinputstreamcanhandlegzip
}
76 \func{static bool
}{CanHandleGZip
}{\void}
78 Returns true if zlib library in use can handle gzip compressed data.
80 % -----------------------------------------------------------------------------
82 % -----------------------------------------------------------------------------
83 \section{\class{wxZlibOutputStream
}}\label{wxzliboutputstream
}
85 This stream compresses all data written to it. The compressed output can be
86 in zlib or gzip format.
87 Note that writing the gzip format requires zlib version
1.2.1 or greater
88 (the builtin version does support gzip format).
90 The stream is not seekable,
\helpref{SeekO()
}{wxoutputstreamseeko
} returns
91 {\it wxInvalidOffset
}.
93 \wxheading{Derived from
}
95 \helpref{wxFilterOutputStream
}{wxfilteroutputstream
}
97 \wxheading{Include files
}
103 \helpref{wxBase
}{librarieslist
}
107 \helpref{wxOutputStream
}{wxoutputstream
},
108 \helpref{wxZlibInputStream
}{wxzlibinputstream
}
111 \latexignore{\rtfignore{\wxheading{Members
}}}
113 \membersection{wxZlibOutputStream::wxZlibOutputStream
}\label{wxzliboutputstreamwxzliboutputstream
}
115 \func{}{wxZlibOutputStream
}{\param{wxOutputStream\&
}{ stream
},
\param{int
}{ level = -
1},
\param{int
}{ flags = wxZLIB
\_ZLIB}}
117 \func{}{wxZlibOutputStream
}{\param{wxOutputStream*
}{ stream
},
\param{int
}{ level = -
1},
\param{int
}{ flags = wxZLIB
\_ZLIB}}
119 Creates a new write-only compressed stream.
{\it level
} means level of
120 compression. It is number between
0 and
9 (including these values) where
121 0 means no compression and
9 best but slowest compression. -
1 is default
122 value (currently equivalent to
6).
124 If the parent stream is passed as a pointer then the new filter stream
125 takes ownership of it. If it is passed by reference then it does not.
127 The
{\it flags
} wxZLIB
\_ZLIB and wxZLIB
\_GZIP specify whether the output data
128 will be in zlib or gzip format. wxZLIB
\_ZLIB is the default.
130 If
{\it flags
} is wxZLIB
\_NO\_HEADER, then a raw deflate stream is output
131 without either zlib or gzip headers. This is a lower level
132 mode, which is not usually used directly. It can be used to embed a raw
133 deflate stream in a higher level protocol.
135 The following symbols can be use for the compression level and flags:
140 wxZ_DEFAULT_COMPRESSION = -
1,
141 wxZ_NO_COMPRESSION =
0,
143 wxZ_BEST_COMPRESSION =
9
148 wxZLIB_NO_HEADER =
0, // raw deflate stream, no header or checksum
149 wxZLIB_ZLIB =
1, // zlib header and checksum
150 wxZLIB_GZIP =
2 // gzip header and checksum, requires zlib
1.2.1+
154 \membersection{wxZlibOutputStream::CanHandleGZip
}\label{wxoutputstreamcanhandlegzip
}
156 \func{static bool
}{CanHandleGZip
}{\void}
158 Returns true if zlib library in use can handle gzip compressed data.