This unit contains a mixed bag of legacy utilities that haven't found a home in any
other directory.  In many cases, the STL provides better options.


On stream buffer, there are two classes inherited from std::streambuf:

* istreambuf_glue class for reading operations
* ostreambuf_infl class for writing operations

The input stream buffer presents a continuous sequence of bytes to the client,
gathered from different sources. For example:

    char* s1 = "world";
    char* s2 = "!";
    char* s3 = "Hello ";

These sources being fed to the stream buffer as s3, s1, s2 will form
"Hello world!" sequence.

In order to do that, istreambuf_glue class represents each source as a chunk of
data, which has its own position in the resulting sequence.
The chunk structure contains a pointer to the source, source size, and
the chunk's offset in the resulting sequence.

Reading is done sequentially within the current chunk. When the end of chunk
reached, the buffer switches to the next one, setting std::streambuf pointers.

Positioning the cursor is done in two steps:

1. Calculate the final cursor position (absolute or by offset).

2. Find the right chunk and local offset in it to set cursor there.

Currently, no intermediate buffering done between chunks (like alignment,
prepending/appending the next chunk). The buffer doesn't take ownership over
the source's memory.

The output stream buffer is mostly like std::stringbuf. The main purpose of it
is having an extensible dynamic array, where clients could write their data,
not worrying about resizing and memory management.

Aside from that, ostreambuf_infl can give away ownership over its memory,
which could be useful for final consumer.

From performance perspective, ostreambuf_infl can reserve an amount of memory
before actual operations. Also, memory extending is done by predefined
portions of 2^11^, 2^12^, 2^13^, 2^14^, 2^15^, 2^15^, 2^15^...
This tries to minimize the number of memory reallocation.
