111293Sandreas.hansson@arm.comThese classes provide a C++ stream interface to the zlib library. It allows you 211293Sandreas.hansson@arm.comto do things like: 311293Sandreas.hansson@arm.com 411293Sandreas.hansson@arm.com gzofstream outf("blah.gz"); 511293Sandreas.hansson@arm.com outf << "These go into the gzip file " << 123 << endl; 611293Sandreas.hansson@arm.com 711293Sandreas.hansson@arm.comIt does this by deriving a specialized stream buffer for gzipped files, which is 811293Sandreas.hansson@arm.comthe way Stroustrup would have done it. :-> 911293Sandreas.hansson@arm.com 1011293Sandreas.hansson@arm.comThe gzifstream and gzofstream classes were originally written by Kevin Ruland 1111293Sandreas.hansson@arm.comand made available in the zlib contrib/iostream directory. The older version still 1211293Sandreas.hansson@arm.comcompiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of 1311293Sandreas.hansson@arm.comthis version. 1411293Sandreas.hansson@arm.com 1511293Sandreas.hansson@arm.comThe new classes are as standard-compliant as possible, closely following the 1611293Sandreas.hansson@arm.comapproach of the standard library's fstream classes. It compiles under gcc versions 1711293Sandreas.hansson@arm.com3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard 1811293Sandreas.hansson@arm.comlibrary naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs 1911293Sandreas.hansson@arm.comfrom the previous one in the following respects: 2011293Sandreas.hansson@arm.com- added showmanyc 2111293Sandreas.hansson@arm.com- added setbuf, with support for unbuffered output via setbuf(0,0) 2211293Sandreas.hansson@arm.com- a few bug fixes of stream behavior 2311293Sandreas.hansson@arm.com- gzipped output file opened with default compression level instead of maximum level 2411293Sandreas.hansson@arm.com- setcompressionlevel()/strategy() members replaced by single setcompression() 2511293Sandreas.hansson@arm.com 2611293Sandreas.hansson@arm.comThe code is provided "as is", with the permission to use, copy, modify, distribute 2711293Sandreas.hansson@arm.comand sell it for any purpose without fee. 2811293Sandreas.hansson@arm.com 2911293Sandreas.hansson@arm.comLudwig Schwardt 3011293Sandreas.hansson@arm.com<schwardt@sun.ac.za> 3111293Sandreas.hansson@arm.com 3211293Sandreas.hansson@arm.comDSP Lab 3311293Sandreas.hansson@arm.comElectrical & Electronic Engineering Department 3411293Sandreas.hansson@arm.comUniversity of Stellenbosch 3511293Sandreas.hansson@arm.comSouth Africa 36