Decompression Problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Decompression Problem

Robert Vinluan
Hi All,

I'm trying to decompress only a fragment of an input stream.  I tried
using boost::iostreams::copy() by passing in a value for the buffer_size

Here's a code example of what I was trying to do:

    filtering_stream<input> in;

    // 'istr' is an istrstream holding the compressed data.

    // I was hoping this would copy only the first 4 decompressed bytes!!
    boost::iostreams::copy(in, cout, 4);

However, when I execute this, the copy() algorithm copies all
decompressed data, ignoring my 'value' of 4.  Perhaps I've misread the

Anyway, I'm not sure if this is the correct approach to solve the
problem, or even if there is a solution using boost.

Any suggestions would be helpful.

Thanks in advance,


P.S. I'm a newbie, so please let me know if this isn't the correct place
to post this message.
Boost-users mailing list
[hidden email]