Tiny_httpd_core.BufSimple buffer.
These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests.
val size : t -> intval clear : t -> unitval create : ?size:int -> unit -> tval of_bytes : bytes -> tval contents : t -> stringval clear_and_zero : t -> unitClear the buffer and zero out its storage.
val bytes_slice : t -> bytesAccess underlying slice of bytes.
val contents_and_clear : t -> stringGet contents of the buffer and clear it.
val add_char : t -> char -> unitAdd a single char.
val add_bytes : t -> bytes -> int -> int -> unitAppend given bytes slice to the buffer.
val add_string : t -> string -> unitAdd string.
val add_buffer : t -> Stdlib.Buffer.t -> unitAppend bytes from buffer.