type fixe = Cstruct.tThe type of input.
val create : int -> tcreate n returns a fresh buffer, initially empty. The n parameter is the initial size of the internal byte sequence that holds the buffer contents. That byte sequence is automatically reallocated when more than n bytes are stored in the buffer, but shrinks back to n bytes when reset is called.
For best performance, n should be of the same order of magnitude as the number of characters that are expected to be stored in the buffer. Nothing bad will happen if the buffer grows beyond that limit, however.
Return a copy of the current contents of the buffer. The buffer itself is unchanged.
val has : t -> intadd fixe buffer appends the fixed-size buffer fixe at the end of the buffer buffer.
val clear : t -> unitEmpty the buffer.
val reset : t -> unitEmpty the buffer and de-allocate the internal byte sequence internal byte sequence of length n that was allocated by Buffer.create n. For long-lived buffers that may have grown a lot, reset allows faster reclamation of the space used by the buffer.