-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Convert between ByteString and Vector.Storable without copying
--   
--   This library allows conversion between the types from
--   <tt>Data.ByteString</tt> (package <tt>bytestring</tt>) and
--   <tt>Data.Vector.Storable</tt> (package <tt>vector</tt>) without
--   copying the underlying data. This is useful, for example, when
--   <tt>ByteString</tt> IO produces or consumes vectors of numbers in
--   native byte order.
--   
--   The conversion relies on the fact that <tt>ByteString</tt> and
--   <tt>Vector</tt> use their respective <tt>ForeignPtr</tt>s in
--   compatible ways.
--   
--   This library is a fork of the <tt>spool</tt> package written by Keegan
--   McAllister.
@package bytestring-to-vector
@version 0.3.0.1


-- | Convert between <tt>ByteString</tt> and <tt>Vector.Storable</tt>
--   without copying.
module Data.Vector.Storable.ByteString

-- | Convert a <tt><a>ByteString</a></tt> to a <tt><a>Vector</a></tt>.
--   
--   This function can produce <tt><a>Vector</a></tt>s which do not obey
--   architectural alignment requirements. On <tt>x86</tt> this should not
--   be an issue.
byteStringToVector :: Storable a => ByteString -> Vector a

-- | Convert a <tt><a>Vector</a></tt> to a <tt><a>ByteString</a></tt>.
vectorToByteString :: Storable a => Vector a -> ByteString
