Buffer.resize

void resize(ptrdiff_t offset, ptrdiff_t size)

Sets the offset and total size of the memory blocks in buffer.

Parameters

offsetthe offset adjustment
sizethe new size or -1 to just adjust the offset