module BigEndian:sig
..end
Same operations as module BatIO
, but with big-endian encoding
This module redefines the operations of module BatIO
which behave
differently on big-endian input
s/output
s.
Generally, to use this module you will wish to either open both
BatIO
and BatIO.BigEndian
, so as to import a big-endian version of
BatIO
, as per
open System.BatIO, BigEndian in ...
,
or to redefine locally BatIO
to use big-endian encodings
module BatIO = System.BatIO include BigEndian
val read_ui16 : BatIO.input -> int
Read an unsigned 16-bit word.
val read_i16 : BatIO.input -> int
Read a signed 16-bit word.
val read_i32 : BatIO.input -> int
Read a signed 32-bit integer.
Overflow
if the
read integer cannot be represented as an OCaml 31-bit integer.val read_real_i32 : BatIO.input -> int32
Read a signed 32-bit integer as an OCaml int32.
val read_i64 : BatIO.input -> int64
Read a signed 64-bit integer as an OCaml int64.
val read_double : BatIO.input -> float
Read an IEEE double precision floating point value.
val read_float : BatIO.input -> float
Read an IEEE single precision floating point value.
val write_ui16 : (int, 'a) BatIO.printer
Write an unsigned 16-bit word.
val write_i16 : (int, 'a) BatIO.printer
Write a signed 16-bit word.
val write_i32 : (int, 'a) BatIO.printer
Write a signed 32-bit integer.
val write_real_i32 : (int32, 'a) BatIO.printer
Write an OCaml int32.
val write_i64 : (int64, 'a) BatIO.printer
Write an OCaml int64.
val write_double : (float, 'a) BatIO.printer
Write an IEEE double precision floating point value.
val write_float : (float, 'a) BatIO.printer
Write an IEEE single precision floating point value.
val ui16s_of : BatIO.input -> int BatEnum.t
Read an enumeration of unsigned 16-bit words.
val i16s_of : BatIO.input -> int BatEnum.t
Read an enumartion of signed 16-bit words.
val i32s_of : BatIO.input -> int BatEnum.t
Read an enumeration of signed 32-bit integers.
Overflow
if the read integer cannot be represented as an OCaml
31-bit integer.val real_i32s_of : BatIO.input -> int32 BatEnum.t
Read an enumeration of signed 32-bit integers as OCaml int32
s.
val i64s_of : BatIO.input -> int64 BatEnum.t
Read an enumeration of signed 64-bit integers as OCaml int64
s.
val doubles_of : BatIO.input -> float BatEnum.t
Read an enumeration of IEEE double precision floating point values.
val floats_of : BatIO.input -> float BatEnum.t
Read an enumeration of IEEE single precision floating point values.