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