Tarray.Buffer
ArrayBuffer
objects (byte buffers).
The type for ArrayBuffer
objects. They hold the bytes of typed arrays.
val create : int -> t
create n
is a new buffer with n
bytes.
val byte_length : t -> int
byte_length b
is the byte length of b
.
slice ~start ~stop b
is a new buffer holding the bytes of b
in range [start
;stop-1
]. This is a copy. start
defaults to 0
and stop
to byte_length b
.
If start
or stop
are negative they are subtracted from byte_length b
. This means that -1
denotes the last byte of the buffer.