On Thursday 06 January 2005 18:46, Christian Prochnow wrote:
> Description:
> IOFilters are proxies which will be called by IODevice's to serve the
> actual I/O requests. The default implementation of IOFilter directly
> calls the real I/O methods (_read, _write, _....).
Don't forget to update the manual ;).
(Just kidding - i'll do that if you don't want to.)
> IOFilters work on any type of IODevice. however I/O filters may
> change the return value of IODevice::isSeekable(). Therefore you
> cannot rely on assumptions like "Files are always seekable".
> Since this is a "raw" zlib deflate stream I/O filter it cannot be
> directly used to decompress/compress gzip files.
> Processing gzip files require an additional header and a trailer
> (http://www.faqs.org/rfcs/rfc1952.html).
AFAIK zlib has gzip_xxx() functions, but i *think* it only has file
variants, not in-memory variants.
> Maybe we should also add an GZipIOFilter ?
> or if it isn't possible a GZipFile() ?
That's exactly what i'm thinking. i have LGPL code for std::i/ostreams
which use gzip and bzip2 (i didn't write the gzip support, and bzip2
was simply a copy/paste plus a one-line change). These should be fairly
trivial to port to FileStream subclasses. In fact, since they're
already std::i/ostream[buffers], they may be usable as-is in P, after
renaming them for P convensions.
--
----- st...@s1... http://s11n.net
"...pleasure is a grace and is not obedient to the commands
of the will." -- Alan W. Watts
|