Copyright | (c) 2010-2013 Vincent Hanquez <vincent@snarc.org> |
---|---|
License | BSD-style |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Data.ASN1.BitArray
Description
Synopsis
- data BitArray = BitArray Word64 ByteString
- newtype BitArrayOutOfBound = BitArrayOutOfBound Word64
- bitArrayLength :: BitArray -> Word64
- bitArrayGetBit :: BitArray -> Word64 -> Bool
- bitArraySetBitValue :: BitArray -> Word64 -> Bool -> BitArray
- bitArraySetBit :: BitArray -> Word64 -> BitArray
- bitArrayClearBit :: BitArray -> Word64 -> BitArray
- bitArrayGetData :: BitArray -> ByteString
- toBitArray :: ByteString -> Int -> BitArray
Documentation
Represent a bitarray / bitmap.
The memory representation starts at bit 0.
Constructors
BitArray Word64 ByteString |
Instances
newtype BitArrayOutOfBound Source #
Thrown in case of out of bounds in the bitarray.
Constructors
BitArrayOutOfBound Word64 |
Instances
Exception BitArrayOutOfBound Source # | |
Defined in Data.ASN1.BitArray Methods toException :: BitArrayOutOfBound -> SomeException # fromException :: SomeException -> Maybe BitArrayOutOfBound # | |
Show BitArrayOutOfBound Source # | |
Defined in Data.ASN1.BitArray Methods showsPrec :: Int -> BitArrayOutOfBound -> ShowS # show :: BitArrayOutOfBound -> String # showList :: [BitArrayOutOfBound] -> ShowS # | |
Eq BitArrayOutOfBound Source # | |
Defined in Data.ASN1.BitArray Methods (==) :: BitArrayOutOfBound -> BitArrayOutOfBound -> Bool # (/=) :: BitArrayOutOfBound -> BitArrayOutOfBound -> Bool # |
bitArrayLength :: BitArray -> Word64 Source #
Returns the length of bits in this bitarray.
bitArraySetBitValue :: BitArray -> Word64 -> Bool -> BitArray Source #
Set the nth bit to the value specified.
bitArrayGetData :: BitArray -> ByteString Source #
Get padded bytestring from the bitarray.
toBitArray :: ByteString -> Int -> BitArray Source #
Number of bits to skip at the end (padding).