1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncThese classes provide a C++ stream interface to the zlib library. It allows you
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncto do things like:
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync gzofstream outf("blah.gz");
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync outf << "These go into the gzip file " << 123 << endl;
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncIt does this by deriving a specialized stream buffer for gzipped files, which is
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncthe way Stroustrup would have done it. :->
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncThe gzifstream and gzofstream classes were originally written by Kevin Ruland
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncand made available in the zlib contrib/iostream directory. The older version still
1b33c96954667ba382fa595baf7b31290bfdd517vboxsynccompiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncthis version.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncThe new classes are as standard-compliant as possible, closely following the
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncapproach of the standard library's fstream classes. It compiles under gcc versions
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard
1b33c96954667ba382fa595baf7b31290bfdd517vboxsynclibrary naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncfrom the previous one in the following respects:
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync- added showmanyc
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync- added setbuf, with support for unbuffered output via setbuf(0,0)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync- a few bug fixes of stream behavior
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync- gzipped output file opened with default compression level instead of maximum level
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync- setcompressionlevel()/strategy() members replaced by single setcompression()
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncThe code is provided "as is", with the permission to use, copy, modify, distribute
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncand sell it for any purpose without fee.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncLudwig Schwardt
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync<schwardt@sun.ac.za>
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncDSP Lab
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncElectrical & Electronic Engineering Department
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncUniversity of Stellenbosch
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncSouth Africa