|
Boost Users : |
Subject: [Boost-users] [iostreams] Problem with gzip_decompressor
From: é³éä»» (chenwj_at_[hidden])
Date: 2010-11-10 03:42:34
Dear all,
Some compressed data was stored in a vector<char> buf (don't know if it's
a right way to store compressed data). I used the "buf" as a source, and
tried to add a gzip_decompressor to restore those data. I have tried the
following approach, but it doesn't work.
vector<char> buf;
/* fill in the buf */
namespace io = boost::iostreams;
io::filtering_istream in(boost::make_iterator_range(buf));
in.push(io::gzip_decompressor());
What I got is an exception,
terminate called after throwing an instance of
'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector
<std::logic_error>>'
what(): chain complete
Aborted
How can I compose a source which comes from a container, and add a
gzip_decompressor to the source? Thanks in advance.
Regards,
chenwj
-- Wei-Jen Chen (é³éä»») Programming Language and System Laboratory (EC131) Department of Computer Science, National Chiao Tung University
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net