Boost logo

Boost :

Subject: [boost] [iostreams] array and gzip_decompressor
From: Nikolay Mladenov (nikolay.mladenov_at_[hidden])
Date: 2010-02-24 01:48:50

Recently I came back to a source written some time ago, that was
running then but it is not compiling now.

the failing snippet is:

                typedef boost::iostreams::composite<boost::iostreams::gzip_decompressor,

                boost::iostreams::gzip_decompressor filter;
                boost::iostreams::array_source source(&_storage[0], _storage.size());
                array_gzip_decompressor dev(filter,source);
                boost::iostreams::stream_buffer<array_gzip_decompressor> ibuf(dev);

the error is:

> boost\iostreams\read.hpp(191) : error C2039: 'putback' : is not a member of 'boost::iostreams::detail::direct_adapter<Direct>'
> with [ Direct=boost::iostreams::array_source ]

It seems to me that gzip_decompressor requires peekable source, but
array_source is not peekable.

Is there another way I should be creating gzipped stream into memory?
Or maybe the arrays could be made peekable?

Thanks in advance,

Nikolay Mladenov

Boost list run by bdawes at, gregod at, cpdaniel at, john at