bytesmith-0.3.3.0: Nonresumable byte parser

Safe HaskellNone
LanguageHaskell2010

Data.Bytes.Parser.BigEndian

Contents

Description

Big-endian fixed-width numbers.

Synopsis

Unsigned

word8 :: e -> Parser e s Word8 Source #

Unsigned 8-bit word.

word16 :: e -> Parser e s Word16 Source #

Unsigned 16-bit word.

word32 :: e -> Parser e s Word32 Source #

Unsigned 32-bit word.

word64 :: e -> Parser e s Word64 Source #

Unsigned 64-bit word.

word128 :: e -> Parser e s Word128 Source #

Unsigned 128-bit word.

Signed

int8 :: e -> Parser e s Int8 Source #

Signed 8-bit integer.

int16 :: e -> Parser e s Int16 Source #

Signed 16-bit integer.

int32 :: e -> Parser e s Int32 Source #

Signed 32-bit integer.

int64 :: e -> Parser e s Int64 Source #

Signed 64-bit integer.

Many

Unsigned

word16Array Source #

Arguments

:: e

Error message if not enough bytes are present

-> Int

Number of big-endian 16-bit words to expect

-> Parser e s (PrimArray Word16)

Native-endian elements

Parse an array of big-endian unsigned 16-bit words. If the host is big-endian, the implementation is optimized to simply memcpy bytes into the result array. The result array always has elements in native-endian byte order.

word32Array Source #

Arguments

:: e

Error message if not enough bytes are present

-> Int

Number of big-endian 32-bit words to expect

-> Parser e s (PrimArray Word32)

Native-endian elements

Parse an array of big-endian unsigned 32-bit words.

word64Array Source #

Arguments

:: e

Error message if not enough bytes are present

-> Int

Number of big-endian 64-bit words to consume

-> Parser e s (PrimArray Word64)

Native-endian elements

Parse an array of big-endian unsigned 64-bit words.

word128Array Source #

Arguments

:: e

Error message if not enough bytes are present

-> Int

Number of big-endian 128-bit words to consume

-> Parser e s (PrimArray Word128)

Native-endian elements

Parse an array of big-endian unsigned 128-bit words.