Conversions between Repa Arrays and ByteStrings.
- toByteString :: Shape sh => Array sh Word8 -> ByteString
- fromByteString :: Shape sh => sh -> ByteString -> Array sh Word8
Documentation
toByteString :: Shape sh => Array sh Word8 -> ByteStringSource
Convert an Array
to a (strict) ByteString
.
fromByteString :: Shape sh => sh -> ByteString -> Array sh Word8Source
Convert a (strict) ByteString
to an Array
.
The given array size must match the length of the ByteString
, else error
.