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