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