asn1-types-0.3.2: ASN.1 types

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe
LanguageHaskell98

Data.ASN1.BitArray

Description

 
Synopsis

Documentation

data BitArray #

represent a bitarray / bitmap

the memory representation start at bit 0

Constructors

BitArray Word64 ByteString 
Instances
Eq BitArray # 
Instance details

Defined in Data.ASN1.BitArray

Methods

(==) :: BitArray -> BitArray -> Bool

(/=) :: BitArray -> BitArray -> Bool

Show BitArray # 
Instance details

Defined in Data.ASN1.BitArray

Methods

showsPrec :: Int -> BitArray -> ShowS

show :: BitArray -> String

showList :: [BitArray] -> ShowS

data BitArrayOutOfBound #

throwed in case of out of bounds in the bitarray.

Constructors

BitArrayOutOfBound Word64 
Instances
Eq BitArrayOutOfBound # 
Instance details

Defined in Data.ASN1.BitArray

Show BitArrayOutOfBound # 
Instance details

Defined in Data.ASN1.BitArray

Methods

showsPrec :: Int -> BitArrayOutOfBound -> ShowS

show :: BitArrayOutOfBound -> String

showList :: [BitArrayOutOfBound] -> ShowS

Exception BitArrayOutOfBound # 
Instance details

Defined in Data.ASN1.BitArray

Methods

toException :: BitArrayOutOfBound -> SomeException

fromException :: SomeException -> Maybe BitArrayOutOfBound

displayException :: BitArrayOutOfBound -> String

bitArrayLength :: BitArray -> Word64 #

returns the length of bits in this bitarray

bitArrayGetBit :: BitArray -> Word64 -> Bool #

get the nth bits

bitArraySetBitValue :: BitArray -> Word64 -> Bool -> BitArray #

set the nth bit to the value specified

bitArraySetBit :: BitArray -> Word64 -> BitArray #

set the nth bits

bitArrayClearBit :: BitArray -> Word64 -> BitArray #

clear the nth bits

bitArrayGetData :: BitArray -> ByteString #

get padded bytestring of the bitarray

toBitArray :: ByteString -> Int -> BitArray #

number of bit to skip at the end (padding)