Boost logo

Boost :

Subject: Re: [boost] Interest in a simple buffer abstraction?
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-01-29 17:44:11

Boris Kolpackov-2 wrote:
> Hi Vicente,
> Vicente Botet <vicente.botet_at_[hidden]> writes:
>> I'm working on a frame concept, which is something like a bidirectional
>> buffer. It allows to prepend and append binary data, and obtain/remove
>> the
>> header and the trailer.
>> In addition we can split a frame in fragments and join fragments to make
>> a
>> frame.
> That sounds like a multi-block buffer, i.e., a buffer that instead of
> one contiguous memory block manages a sequence of such blocks. While
> this would allow more efficient resizing, prepending, etc., the
> interface becomes somewhat more complicated. But it can be another
> implementation, in addition to the simple buffer.

A fragment has continuous memory and allows to prepend and append respecting
its initial capacity.
A frame can be non-continuous.

> I didn't want to mention this possibility initially in order to keep
> things simple, but it seem people here are more interested in the
> complex than simple ;-).

I'm talking of what I have found as real needs in concrete projects. The
simple buffer functionality you are presenting don't satisfies my needs.
This doesn't mind that the abstraction don't have other uses, but instead of
appending what I use to need is to prepend headers.


View this message in context:
Sent from the Boost - Dev mailing list archive at

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