On Tuesday 21 January 2003 14:07, stephan beal wrote:
> learned a bit about gzread/write, and hopefully it's enough to implement
> real i/ofstream subclasses. If i manage to do it i will submit the code to
> zipios.
i have a question about this part, actually:
What point in the iostreams API is the proper place to put the de/compression
code? i've noticed that in your classes you appear to use over/underflow(),
as does the older zipstream i was using. This one from zlib/contrib does the
de/compression in read() and write() (and in the redirection operators).
Where is the preferred place to do the actual de/compression?
As i understand it, it goes something like this (but i could be wrong):
overflow() is for output. It takes one char, and that one char is added to the
compressed stream.
underflow() is for input. It and takes one byte off of the compressed stream
and decompresses it (well, decompresses once it gets enough data to
decompress, i guess).
Is that correct?
Thanks in advance,
--
----- stephan
stephan@... - http://www.einsurance.de
Office: +49 (89) 552 92 862 Handy: +49 (179) 211 97 67
i need a woman who can say, 'honey, can you please take
a look at this stack trace while I order the pizza?' and
really mean it.
|