Copyright | (c) Claude Heiland-Allen 2012 |
---|---|
License | BSD3 |
Maintainer | claude@mathr.co.uk |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Copy bit array data to and from ByteStrings.
- toByteString :: Ix i => BitArray i -> ByteString
- fromByteString :: Ix i => (i, i) -> ByteString -> BitArray i
- toByteStringIO :: Ix i => IOBitArray i -> IO ByteString
- fromByteStringIO :: Ix i => (i, i) -> ByteString -> IO (IOBitArray i)
Immutable copying.
toByteString :: Ix i => BitArray i -> ByteString Source
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.
:: 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 ByteString Source
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.
:: Ix i | |
=> (i, i) | bounds |
-> ByteString | packed elems |
-> IO (IOBitArray i) |
Copy from a ByteString. Much like newListArray
but with packed bits.