bitwise-0.1: fast multi-dimensional unboxed bit packed Bool arrays

Portabilityportable
Stabilityunstable
Maintainerclaudiusmaximus@goto10.org
Safe HaskellSafe-Infered

Data.Array.BitArray.ByteString

Contents

Description

Copy bit array data to and from ByteStrings.

Synopsis

Immutable copying.

toByteString :: Ix i => BitArray i -> ByteStringSource

Copy to a ByteString. The most significant bits of the last byte are padded with 0 unless the array was a multiple of 8 bits in size.

fromByteStringSource

Arguments

:: Ix i 
=> (i, i)

bounds

-> ByteString

packed elems

-> BitArray i 

Copy from a ByteString. Much like listArray but with packed bits.

Mutable copying.

toByteStringIO :: Ix i => IOBitArray i -> IO ByteStringSource

Copy to a ByteString. The most significant bits of the last byte are padded with 0 unless the array was a multiple of 8 bits in size.

fromByteStringIOSource

Arguments

:: Ix i 
=> (i, i)

bounds

-> ByteString

packed elems

-> IO (IOBitArray i) 

Copy from a ByteString. Much like newListArray but with packed bits.