package batteries

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module BatIO.BigEndianSource

Same operations as module BatIO, but with big-endian encoding

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

Generally, to use this module you will wish to either open both BatIO and 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

Sourceval read_ui16 : input -> int

Read an unsigned 16-bit word.

Sourceval read_i16 : input -> int

Read a signed 16-bit word.

Sourceval read_i32 : input -> int

Read a signed 32-bit integer.

  • raises Overflow

    if the read integer cannot be represented as an OCaml 31-bit integer.

Sourceval read_real_i32 : input -> int32

Read a signed 32-bit integer as an OCaml int32.

Sourceval read_i64 : input -> int64

Read a signed 64-bit integer as an OCaml int64.

Sourceval read_double : input -> float

Read an IEEE double precision floating point value.

Sourceval read_float : input -> float

Read an IEEE single precision floating point value.

Sourceval write_ui16 : (int, _) printer

Write an unsigned 16-bit word.

Sourceval write_i16 : (int, _) printer

Write a signed 16-bit word.

Sourceval write_i32 : (int, _) printer

Write a signed 32-bit integer.

Sourceval write_real_i32 : (int32, _) printer

Write an OCaml int32.

Sourceval write_i64 : (int64, _) printer

Write an OCaml int64.

Sourceval write_double : (float, _) printer

Write an IEEE double precision floating point value.

Sourceval write_float : (float, _) printer

Write an IEEE single precision floating point value.

Sourceval ui16s_of : input -> int BatEnum.t

Read an enumeration of unsigned 16-bit words.

Sourceval i16s_of : input -> int BatEnum.t

Read an enumartion of signed 16-bit words.

Sourceval i32s_of : input -> int BatEnum.t

Read an enumeration of signed 32-bit integers.

  • raises Overflow

    if the read integer cannot be represented as an OCaml 31-bit integer.

Sourceval real_i32s_of : input -> int32 BatEnum.t

Read an enumeration of signed 32-bit integers as OCaml int32s.

Sourceval i64s_of : input -> int64 BatEnum.t

Read an enumeration of signed 64-bit integers as OCaml int64s.

Sourceval doubles_of : input -> float BatEnum.t

Read an enumeration of IEEE double precision floating point values.

Sourceval floats_of : input -> float BatEnum.t

Read an enumeration of IEEE single precision floating point values.

OCaml

Innovation. Community. Security.