License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe |
Language | Haskell98 |
Synopsis
- data BitArray = BitArray Word64 ByteString
- data 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 start at bit 0
data BitArrayOutOfBound Source #
throwed in case of out of bounds in the bitarray.
Instances
Eq BitArrayOutOfBound Source # | |
Defined in Data.ASN1.BitArray (==) :: BitArrayOutOfBound -> BitArrayOutOfBound -> Bool # (/=) :: BitArrayOutOfBound -> BitArrayOutOfBound -> Bool # | |
Show BitArrayOutOfBound Source # | |
Defined in Data.ASN1.BitArray showsPrec :: Int -> BitArrayOutOfBound -> ShowS # show :: BitArrayOutOfBound -> String # showList :: [BitArrayOutOfBound] -> ShowS # | |
Exception BitArrayOutOfBound Source # | |
Defined in Data.ASN1.BitArray |
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 of the bitarray
toBitArray :: ByteString -> Int -> BitArray Source #
number of bit to skip at the end (padding)