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