README 1.5 KB
Newer Older
M
Mark Adler 已提交
1 2 3 4 5
These classes provide a C++ stream interface to the zlib library. It allows you
to do things like:

  gzofstream outf("blah.gz");
  outf << "These go into the gzip file " << 123 << endl;
M
Mark Adler 已提交
6

M
Mark Adler 已提交
7
It does this by deriving a specialized stream buffer for gzipped files, which is
M
Mark Adler 已提交
8
the way Stroustrup would have done it. :->
M
Mark Adler 已提交
9 10 11

The gzifstream and gzofstream classes were originally written by Kevin Ruland
and made available in the zlib contrib/iostream directory. The older version still
M
Mark Adler 已提交
12
compiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of
M
Mark Adler 已提交
13 14
this version.

M
Mark Adler 已提交
15 16 17 18
The new classes are as standard-compliant as possible, closely following the
approach of the standard library's fstream classes. It compiles under gcc versions
3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard
library naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs
M
Mark Adler 已提交
19 20 21 22 23 24 25
from the previous one in the following respects:
- added showmanyc
- added setbuf, with support for unbuffered output via setbuf(0,0)
- a few bug fixes of stream behavior
- gzipped output file opened with default compression level instead of maximum level
- setcompressionlevel()/strategy() members replaced by single setcompression()

M
Mark Adler 已提交
26
The code is provided "as is", with the permission to use, copy, modify, distribute
M
Mark Adler 已提交
27 28 29 30 31 32 33 34 35
and sell it for any purpose without fee.

Ludwig Schwardt
<schwardt@sun.ac.za>

DSP Lab
Electrical & Electronic Engineering Department
University of Stellenbosch
South Africa