1 1.1 christos These classes provide a C++ stream interface to the zlib library. It allows you 2 1.1 christos to do things like: 3 1.1 christos 4 1.1 christos gzofstream outf("blah.gz"); 5 1.1 christos outf << "These go into the gzip file " << 123 << endl; 6 1.1 christos 7 1.1 christos It does this by deriving a specialized stream buffer for gzipped files, which is 8 1.1 christos the way Stroustrup would have done it. :-> 9 1.1 christos 10 1.1 christos The gzifstream and gzofstream classes were originally written by Kevin Ruland 11 1.1 christos and made available in the zlib contrib/iostream directory. The older version still 12 1.1 christos compiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of 13 1.1 christos this version. 14 1.1 christos 15 1.1 christos The new classes are as standard-compliant as possible, closely following the 16 1.1 christos approach of the standard library's fstream classes. It compiles under gcc versions 17 1.1 christos 3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard 18 1.1 christos library naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs 19 1.1 christos from the previous one in the following respects: 20 1.1 christos - added showmanyc 21 1.1 christos - added setbuf, with support for unbuffered output via setbuf(0,0) 22 1.1 christos - a few bug fixes of stream behavior 23 1.1 christos - gzipped output file opened with default compression level instead of maximum level 24 1.1 christos - setcompressionlevel()/strategy() members replaced by single setcompression() 25 1.1 christos 26 1.1 christos The code is provided "as is", with the permission to use, copy, modify, distribute 27 1.1 christos and sell it for any purpose without fee. 28 1.1 christos 29 1.1 christos Ludwig Schwardt 30 1.1 christos <schwardt (a] sun.ac.za> 31 1.1 christos 32 1.1 christos DSP Lab 33 1.1 christos Electrical & Electronic Engineering Department 34 1.1 christos University of Stellenbosch 35 1.1 christos South Africa 36