Opened 5 years ago

Last modified 5 years ago

#13075 new Bugs

gzip_decompressor cannot be pushed to filtering_stream if provided with input_seekable

Reported by: hellohee Owned by: Jonathan Turkanis
Milestone: To Be Determined Component: iostreams
Version: Boost 1.63.0 Severity: Problem
Keywords: gzip, seekable Cc:

Description

There is a ticket regarding making filtering stream seekable: https://svn.boost.org/trac/boost/ticket/2449 However, the solution doesn't apply to situations where gzip decompressor is pushed.

boost::iostreams::filtering_stream<boost::iostreams::input_seekable> instream; boost::iostreams::file_source file(filename, std::ios_base::in | std::ios_base::binary); instream.push(boost::iostreams::gzip_decompressor()); -> fails HERE instream.push(file);

Change History (1)

comment:1 by anonymous, 5 years ago

Maybe I misunderstand, but that is correct behaviour. Seeking in compressed streams is not possible in a reasonable way, so you should not be able to push a decompressor if you need the input to be seekable.

Note: See TracTickets for help on using tickets.