Module IO.BigEndian


module IO.BigEndian: sig .. end
Same operations as module IO, but with big-endian encoding


This module redefines the operations of module IO which behave differently on big-endian inputs/outputs.

Generally, to use this module you will wish to either open both IO and IO.BigEndian, so as to import a big-endian version of IO, as per open System.IO, BigEndian in ..., or to redefine locally IO to use big-endian encodings module IO = System.IO include BigEndian

val read_ui16 : IO.input -> int
Read an unsigned 16-bit word.
val read_i16 : IO.input -> int
Read a signed 16-bit word.
val read_i32 : IO.input -> int
Read a signed 32-bit integer. Raise Overflow if the read integer cannot be represented as a Caml 31-bit integer.
val read_real_i32 : IO.input -> int32
Read a signed 32-bit integer as an OCaml int32.
val read_i64 : IO.input -> int64
Read a signed 64-bit integer as an OCaml int64.
val read_double : IO.input -> float
Read an IEEE double precision floating point value.
val read_float : IO.input -> float
Read an IEEE single precision floating point value.
val write_ui16 : 'a IO.output -> int -> unit
Write an unsigned 16-bit word.
val write_i16 : 'a IO.output -> int -> unit
Write a signed 16-bit word.
val write_i32 : 'a IO.output -> int -> unit
Write a signed 32-bit integer.
val write_real_i32 : 'a IO.output -> int32 -> unit
Write an OCaml int32.
val write_i64 : 'a IO.output -> int64 -> unit
Write an OCaml int64.
val write_double : 'a IO.output -> float -> unit
Write an IEEE double precision floating point value.
val write_float : 'a IO.output -> float -> unit
Write an IEEE single precision floating point value.
val ui16s_of : IO.input -> int Enum.t
Read an enumeration of unsigned 16-bit words.
val i16s_of : IO.input -> int Enum.t
Read an enumartion of signed 16-bit words.
val i32s_of : IO.input -> int Enum.t
Read an enumeration of signed 32-bit integers. Raise Overflow if the read integer cannot be represented as a Caml 31-bit integer.
val real_i32s_of : IO.input -> int32 Enum.t
Read an enumeration of signed 32-bit integers as OCaml int32s.
val i64s_of : IO.input -> int64 Enum.t
Read an enumeration of signed 64-bit integers as OCaml int64s.
val doubles_of : IO.input -> float Enum.t
Read an enumeration of IEEE double precision floating point values.
val write_bytes : 'a IO.output -> int Enum.t -> unit
Write an enumeration of unsigned 8-bit bytes.
val write_ui16s : 'a IO.output -> int Enum.t -> unit
Write an enumeration of unsigned 16-bit words.
val write_i16s : 'a IO.output -> int Enum.t -> unit
Write an enumeration of signed 16-bit words.
val write_i32s : 'a IO.output -> int Enum.t -> unit
Write an enumeration of signed 32-bit integers.
val write_real_i32s : 'a IO.output -> int32 Enum.t -> unit
Write an enumeration of OCaml int32s.
val write_i64s : 'a IO.output -> int64 Enum.t -> unit
Write an enumeration of OCaml int64s.
val write_doubles : 'a IO.output -> float Enum.t -> unit
Write an enumeration of IEEE double precision floating point value.