Portable big-endian and little-endian conversions

Version on this page:
LTS Haskell 22.29:
Stackage Nightly 2024-07-13:
Latest on Hackage:

See all snapshots byte-order appears in

BSD-3-Clause licensed by Andrew Martin
Maintained by [email protected]
This version can be pinned in stack with:byte-order-,1349

Module documentation for

This library provides an interface to portably work with byte arrays whose contents are known to be of a fixed endianness. There are two ways to use this module. See the System.ByteOrder module for more documentation.


Revision history for byte-order – 2021-02-22

  • Add a module for big-endian access to pointers.
  • Add Bytes instances for Word128 and Word256. – 2020-01-06

  • Add a Bytes instance for Word. – YYYY-mm-dd

  • Add PrimUnaligned instance for Fixed.
  • Add modules for more convenient interface to reading and writing fixed-endianness elements to byte arrays: Data.Primitive.ByteArray.LittleEndian and Data.Primitive.ByteArray.BigEndian. – 2019-05-29

  • Initial release.