Using boost::iostreams::restrict without overconsuming the original stream

7 Oct
2013
7 Oct
'13
9:15 a.m.
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?
4156
Age (days ago)
4156
Last active (days ago)
0 comments
1 participants
participants (1)
-
Avi Kivity