package cstruct

  1. Overview
  2. Docs
Access C-like structures directly from OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cstruct-6.2.0.tbz
sha256=9a78073392580e8349148fa3ab4b1b2e989dc9d30d07401b04c96b7c60f03e62
sha512=8d33fe6b3707a3994d0225cd33cadde0bb2ca834ef01096e3df33a08e4a8c6d02ebccddf558a73988b8a5595b65fdc10de61efbf872c6c9e55c719c7e19c463d

doc/cstruct/Cstruct/HE/index.html

Module Cstruct.HESource

Get/set host-endian integers of various sizes. The second argument of those functions is the position relative to the current offset of the cstruct.

Sourceval get_uint16 : t -> int -> uint16

get_uint16 cstr off is the 16 bit long host-endian unsigned integer stored in cstr at offset off.

Sourceval get_uint32 : t -> int -> uint32

get_uint32 cstr off is the 32 bit long host-endian unsigned integer stored in cstr at offset off.

Sourceval get_uint64 : t -> int -> uint64

get_uint64 cstr off is the 64 bit long host-endian unsigned integer stored in cstr at offset off.

Sourceval set_uint16 : t -> int -> uint16 -> unit

set_uint16 cstr off i writes the 16 bit long host-endian unsigned integer i at offset off of cstr.

Sourceval set_uint32 : t -> int -> uint32 -> unit

set_uint32 cstr off i writes the 32 bit long host-endian unsigned integer i at offset off of cstr.

Sourceval set_uint64 : t -> int -> uint64 -> unit

set_uint64 cstr off i writes the 64 bit long host-endian unsigned integer i at offset off of cstr.