type t =
(char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout)Stdlib.Bigarray.Array1.t
Buffers with C storage.
These are OCaml bigstrings (char bigarrays). Roughly speaking, they correspond to C buffers referenced by pointers of type char*, but also know their own size.
In addition to being usable with the functions in this module, the type is compatible with at least the following libraries:
val blit_to_bytes : t->bytes ->destination_offset:int -> unit
Copies data from a buffer to a bytes buffer.
val blit_from_bytes : t->bytes ->source_offset:int -> unit
Copies data from a bytes buffer to a buffer.
val blit_from_string : t->string ->source_offset:int -> unit
Copies data from a string to a buffer.
Lists of buffers
Many Luv functions, such as Luv.File.write, work with lists of buffers (i.e., they do scatter-gather I/O). These are helpers for working with buffer lists.
drop buffers count drops the first count bytes from buffers.
For example, if buffers contains two buffers of size 16, drop buffers
18 will evaluate to a list that has lost the reference to the first buffer, and contains only a view into the second buffer of size 14.