# mutable o_s
|: string||;||(*||Buffer string||*)|
# mutable o_max_len
|: int||;||(*||Same as ||*)|
# mutable o_len
|: int||;||(*||Length of the data present in the buffer = current position in the buffer||*)|
# mutable o_offs
|: int||;||(*||Length of data written and flushed out of the buffer.
The total number of bytes written to the buffer
is therefore ||*)|
|: int||;||(*||Initial length of the buffer||*)|
|: t -> int -> unit||;||(*||*)|
|: Bi_share.Wr.tbl||;||(*||Hash table used to map shared objects to positions in the input stream.||*)|
|: int||;||(*||Initial length of the ||*)|
Default make_room function: reallocate a larger buffer string.
Pair of convenience functions for creating a buffer that flushes data to an out_channel when it is full.
Pair of convenience functions for creating a buffer that flushes data to an object when it is full.
Guarantee that the buffer string has enough room for n additional bytes.
alloc buf n makes room for
n bytes and returns the position
of the first byte in the buffer string
It behaves as if
n arbitrary bytes were added and it is
the user's responsibility to set them to some meaningful values
add_substring dst src srcpos len copies
len bytes from
src to buffer
dst starting from position
Add a byte to the buffer without checking that there is enough room for it.
Remove any data present in the buffer and in the table holding shared objects.