class BufferStream : public MemStream
A Stream based on a Vector<byte> buffer, beeing able to open such a Vector<byte> to Loading or directly serializing to such a Vector.It automatically increases the underlying Vector. It uses _pick semantics to open a Vector<byte> and returns the underlying Vector<byte> as _pick (leaving a new instance under hood, so new buffering is possible as well)
void Open(Vector<byte> & d)
Picks the Vector d.as underlying buffer in Loading mode.
resets underlying buffer and sets Stream to Storing mode. rewinds current ptr to beginning.
void Reserve(int n)
reserves additional n.bytes in the Stream. sets Storing mode.can speed up things if you know how much is to come.
crops the internal buffer to currently used size, use when storing.
picks internal Vector, leaving an initialized Vector for new operations.
creates a BufferStream in Storing Mode
Creates a BufferStream in Loading mode. Loads Vector d.picking it.