This is the same as calling init2 with the given arguments and offset = 0.
This is the same as calling init3 with the given arguments and chunk_keep = max_chunk.
Initializes Buffers. Each buffer size is given in the |chunk_length|. The maximum number of buffers is given in the |max_chunk|. On reset, first |chunk_keep| buffers are kept and remaining buffers are deleted. Each buffer will have bufs.pos and bufs.last shifted to left by |offset| bytes on creation and reset.
Frees any related resources
Fills dst with a slice of the head chain's buffer, and frees the chain if it becomes empty chunk_keep must be 1 for buffers to be emptied this way.
The number of Chains to keep on reset
The buffer capacity of each Buffer
The number of Chains allocated
Buffer pointer where write occurs.
true if the buffers were initialized with a pre-allocated ubyte[] which mustn't be freed
Points to the first buffer
The maximum number of Chains
pos offset from begin in each buffers. On initialization and reset, buf.pos and buf.last are positioned at buf.begin + offset.
true if we should secure the Buffer allocations
true if the Buffer allocations should be zeroized