Portability | unknown |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Safe Haskell | Safe-Inferred |
- 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
data BitArrayOutOfBound Source
throwed in case of out of bounds in the bitarray.
bitArrayLength :: BitArray -> Word64Source
returns the length of bits in this bitarray
bitArrayGetBit :: BitArray -> Word64 -> BoolSource
get the nth bits
bitArraySetBitValue :: BitArray -> Word64 -> Bool -> BitArraySource
set the nth bit to the value specified
bitArraySetBit :: BitArray -> Word64 -> BitArraySource
set the nth bits
bitArrayClearBit :: BitArray -> Word64 -> BitArraySource
clear the nth bits
bitArrayGetData :: BitArray -> ByteStringSource
get padded bytestring of the bitarray
toBitArray :: ByteString -> Int -> BitArraySource
number of bit to skip at the end (padding)