| 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 |
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 displayException :: BitArrayOutOfBound -> String backtraceDesired :: BitArrayOutOfBound -> Bool | |
| 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.
bitArrayGetBit :: BitArray -> Word64 -> Bool Source #
Get the nth bits.
bitArraySetBitValue :: BitArray -> Word64 -> Bool -> BitArray Source #
Set the nth bit to the value specified.
bitArraySetBit :: BitArray -> Word64 -> BitArray Source #
Set the nth bit.
bitArrayClearBit :: BitArray -> Word64 -> BitArray Source #
Clear the nth bit.
bitArrayGetData :: BitArray -> ByteString Source #
Get padded bytestring from the bitarray.
toBitArray :: ByteString -> Int -> BitArray Source #
Number of bits to skip at the end (padding).