Tarray.Data_view
DataView objects
(byte-level typed data access on ArrayBuffer
s).
This module allows to read and write buffers with any data element at any byte offset.
The type for DataView objects.
of_buffer ~byte_offset ~length b k
provides access to byte_length
(defaults to Buffer.byte_length b
) bytes of b
starting at byte offset byte_offset
.
val byte_offset : t -> int
byte_offset d
is the byte index where d
starts in buffer d
.
val byte_length : t -> int
byte_length d
is the byte length of d
.
Suffixes. _be
stands for big endian, _le
for little endian.
val get_int8 : t -> int -> int
val get_int16_be : t -> int -> int
val get_int16_le : t -> int -> int
val get_int32_be : t -> int -> int32
val get_int32_le : t -> int -> int32
val get_uint8 : t -> int -> int
val get_uint16_be : t -> int -> int
val get_uint16_le : t -> int -> int
val get_uint32_be : t -> int -> int32
val get_uint32_le : t -> int -> int32
val get_float32_be : t -> int -> float
val get_float32_le : t -> int -> float
val get_float64_be : t -> int -> float
val get_float64_le : t -> int -> float
Suffixes. _be
stands for big endian, _le
for little endian.
val set_int8 : t -> int -> int -> unit
val set_int16_be : t -> int -> int -> unit
val set_int16_le : t -> int -> int -> unit
val set_int32_be : t -> int -> int32 -> unit
val set_int32_le : t -> int -> int32 -> unit
val set_uint8 : t -> int -> int -> unit
val set_uint16_be : t -> int -> int -> unit
val set_uint16_le : t -> int -> int -> unit
val set_uint32_be : t -> int -> int32 -> unit
val set_uint32_le : t -> int -> int32 -> unit
val set_float32_be : t -> int -> float -> unit
val set_float32_le : t -> int -> float -> unit
val set_float64_be : t -> int -> float -> unit
val set_float64_le : t -> int -> float -> unit