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