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