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