binary-bits-0.5: Bit parsing/writing on top of binary.
Copyright(c) Lennart Kolmodin 2010-2011
LicenseBSD3-style (see LICENSE)
Maintainerkolmodin@gmail.com
Stabilityexperimental
Portabilityportable (should run where the package binary runs)
Safe HaskellNone
LanguageHaskell98

Data.Binary.Bits

Description

Parse and write bits easily. Parsing can be done either in a monadic style, or more efficiently, using the Applicative style. Writing is monadic style only. See Data.Binary.Bits.Get and Data.Binary.Bits.Put, respectively.

Documentation

class BinaryBit a where Source #

Methods

putBits :: Int -> a -> BitPut () Source #

getBits :: Int -> BitGet a Source #

Instances

Instances details
BinaryBit Bool Source # 
Instance details

Defined in Data.Binary.Bits

Methods

putBits :: Int -> Bool -> BitPut () Source #

getBits :: Int -> BitGet Bool Source #

BinaryBit Word8 Source # 
Instance details

Defined in Data.Binary.Bits

Methods

putBits :: Int -> Word8 -> BitPut () Source #

getBits :: Int -> BitGet Word8 Source #

BinaryBit Word16 Source # 
Instance details

Defined in Data.Binary.Bits

Methods

putBits :: Int -> Word16 -> BitPut () Source #

getBits :: Int -> BitGet Word16 Source #

BinaryBit Word32 Source # 
Instance details

Defined in Data.Binary.Bits

Methods

putBits :: Int -> Word32 -> BitPut () Source #

getBits :: Int -> BitGet Word32 Source #

BinaryBit Word64 Source # 
Instance details

Defined in Data.Binary.Bits

Methods

putBits :: Int -> Word64 -> BitPut () Source #

getBits :: Int -> BitGet Word64 Source #