Copyright | (c) Claude Heiland-Allen 20122018 |
---|---|
License | BSD3 |
Maintainer | [email protected] |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Data.Array.BitArray.ByteString
Description
Copy bit array data to and from ByteStrings.
Synopsis
- 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.
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 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.
Arguments
:: Ix i | |
=> (i, i) | bounds |
-> ByteString | packed elems |
-> IO (IOBitArray i) |
Copy from a ByteString. Much like newListArray
but with packed bits.