crypton-asn1-types
Copyright(c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
LicenseBSD-style
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.ASN1.BitArray

Description

 
Synopsis

Documentation

data BitArray Source #

Represent a bitarray / bitmap.

The memory representation starts at bit 0.

Constructors

BitArray Word64 ByteString 

Instances

Instances details
Show BitArray Source # 
Instance details

Defined in Data.ASN1.BitArray

Methods

showsPrec :: Int -> BitArray -> ShowS

show :: BitArray -> String

showList :: [BitArray] -> ShowS

Eq BitArray Source # 
Instance details

Defined in Data.ASN1.BitArray

Methods

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

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

newtype BitArrayOutOfBound Source #

Thrown in case of out of bounds in the bitarray.

Constructors

BitArrayOutOfBound Word64 

Instances

Instances details
Exception BitArrayOutOfBound Source # 
Instance details

Defined in Data.ASN1.BitArray

Show BitArrayOutOfBound Source # 
Instance details

Defined in Data.ASN1.BitArray

Methods

showsPrec :: Int -> BitArrayOutOfBound -> ShowS

show :: BitArrayOutOfBound -> String

showList :: [BitArrayOutOfBound] -> ShowS

Eq BitArrayOutOfBound Source # 
Instance details

Defined in Data.ASN1.BitArray

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).