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

Copyright | (c) Claude Heiland-Allen 20122018
License | BSD3
Maintainer | claude@mathr.co.uk
Stability | unstable
Portability | portable
Safe Haskell | None
Language | Haskell2010

Data.Array.BitArray.ByteString

Contents

- Immutable copying.
- Mutable copying.

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.

fromByteString Source #

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.

fromByteStringIO Source #

Arguments

:: Ix i |
=> (i, i) | bounds
-> ByteString | packed elems
-> IO (IOBitArray i) |

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