HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulecrypton-2.1.7Haskell2010

Crypto.Number.Serialize.Internal.LE

Fast serialization primitives for integer using raw pointers (little endian)

  • 3 values
  • Packagecrypton-2.1.7
  • Exports3
  • LanguageHaskell2010
  • LicenceBSD-3-Clause AND MIT AND ISC
  • SourceLE.hs
valuei2osp :: Integer -> Ptr Word8 -> Int -> IO Int
#

Fill a pointer with the little endian binary representation of an integer

If the room available ptrSz is less than the number of bytes needed, 0 is returned. Likewise if a parameter is invalid, 0 is returned.

Returns the number of bytes written

valueos2ip :: Ptr Word8 -> Int -> IO Integer
#

Transform a little endian binary integer representation pointed by a pointer and a size into an integer