Boost logo

Boost Users :

Subject: [Boost-users] Using boost::iostreams::restrict without overconsuming the original stream
From: Avi Kivity (avi_at_[hidden])
Date: 2013-10-07 05:15:39


Hi, I amy trying to split an incoming streams into multiple substreams
(specifically, an incoming cpio stream into its individual files). After
parsing the header in the incoming stream, I have the file size, and can
use boost::iostreams::restrict to create a substream containing only the
file data, which the user can subsequently consume.

However some experiments with filtering_streambuf show that it will consume
past the end of the substream. Will the same happen with restrict?



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