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 #

Methods

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

getBits :: Int -> BitGet a #

Instances
BinaryBit Bool # 
Instance details

Defined in Data.Binary.Bits

Methods

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

getBits :: Int -> BitGet Bool #

BinaryBit Word8 # 
Instance details

Defined in Data.Binary.Bits

Methods

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

getBits :: Int -> BitGet Word8 #

BinaryBit Word16 # 
Instance details

Defined in Data.Binary.Bits

Methods

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

getBits :: Int -> BitGet Word16 #

BinaryBit Word32 # 
Instance details

Defined in Data.Binary.Bits

Methods

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

getBits :: Int -> BitGet Word32 #

BinaryBit Word64 # 
Instance details

Defined in Data.Binary.Bits

Methods

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

getBits :: Int -> BitGet Word64 #