HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulebyte-order-0.1.3.1Haskell2010

Data.Primitive.ByteArray.BigEndian

This is drop-in replacement for the read, write, and index functions present in Data.Primitive.ByteArray and Data.Primitive.ByteArray.Unaligned. While the functions from those modules use native byte order, the functions in this one use big-endian byte order (most significant byte first).

Contents
  1. Aligned
  2. Unaligned
Synopsis

Aligned

valueindexByteArray :: (Prim a, Bytes a) => ByteArray -> Int -> a

Read a primitive value from the byte array, interpreting the first byte as the most significant one. The offset is given in elements of type a rather than in bytes.

Unaligned