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