roshask-0.1.0: Haskell support for the ROS robotics framework.

Ros.Core.Util.BytesToVector

Synopsis

Documentation

unsafeBytesToVector :: Storable a => Int -> ByteString -> Vector a

Construct a Vector with the specified number of elements from a strict ByteString without copying.

bytesToVectorL :: Storable a => Int -> ByteString -> Vector a

Construct a Vector with the specified number of elements from a lazy ByteString.

bytesToVector :: Storable a => Int -> ByteString -> Vector a

Construct a Vector with the specified number of elements from a strict ByteString making a copy of the underlying data in the process.

unsafeVectorToBytes :: forall a. Storable a => Vector a -> ByteString

Construct a strict ByteString from a Vector without copying the underlying data.

vectorToBytes :: forall a. Storable a => Vector a -> ByteString

Construct a strict ByteString from a copy of the data underlying a Vector.