mte/unikernel/duniverse/ocplib-endian
2025-11-11 02:07:51 +01:00
..
src 2025-11-11 02:07:51 +01:00
tests 2025-11-11 02:07:51 +01:00
.gitignore 2025-11-11 02:07:51 +01:00
.travis.yml 2025-11-11 02:07:51 +01:00
appveyor.yml 2025-11-11 02:07:51 +01:00
CHANGES.md 2025-11-11 02:07:51 +01:00
COPYING.txt 2025-11-11 02:07:51 +01:00
dune-project 2025-11-11 02:07:51 +01:00
Makefile 2025-11-11 02:07:51 +01:00
ocplib-endian.opam 2025-11-11 02:07:51 +01:00
README.md 2025-11-11 02:07:51 +01:00

ocplib-endian

Optimised functions to read and write int16/32/64 from strings, bytes and bigarrays, based on primitives added in version 4.01.

The library implements three modules:

  • EndianString works directly on strings, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts;
  • EndianBytes works directly on bytes, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts;
  • EndianBigstring works on bigstrings (Bigarrays of chars), and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts;

= Hacking =

The tests only pass in dune release profile. The debug mode prevents cross module inlining, which prevents unboxing in the tests.