Boost logo

Boost :

From: Sylvester-Bradley, Gareth (Gareth.Sylvester-Bradley_at_[hidden])
Date: 2007-07-05 11:25:57

I use Boost.Iostreams to read & write large (10s of GB) files on a
number of unusual filesystems. One of the things that would improve
performance a lot for me, due to these filesystems, would be the ability
to vary the current input or output buffer size *during* reading and


In my understanding this is what std::streambuf::setbuf() virtual member
function is for, but unfortunately Boost.Iostreams streambufs don't
implement this.


It seems that it ought to be possible to provide setbuf() implementation
for boost::iostreams::detail::indirect_streambuf by refactoring out a
little of the code in open() and potentially making sure that the
previous contents of the buffer is copied into the new one but I'm
struggling to understand how the indirect_streambuf uses basic_buffers,
and whether there are any other pitfalls I haven't spotted.


Please would some kind Booster point me in the right direction (or just
provide the patch! :-).





The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only.

This email and any response may be monitored by Sony to be in compliance with Sony’s global policies and standards

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