spool: Convert between ByteString and Vector.Storable without copying

[ bsd3, data-structures, library ] [ Propose Tags ] [ Report a vulnerability ]

This library allows conversion between the types from Data.ByteString (package bytestring) and Data.Vector.Storable (package vector) without copying the underlying data. This is useful, for example, when ByteString IO produces or consumes vectors of numbers in native byte order.

This trick relies on the fact that ByteString and Vector use their respective ForeignPtrs in compatible ways. It works with bytestring-0.9.1.10 and vector-0.9 on GHC 7.0. It may break with future releases of these packages. Depending on this library should be seen as a way to document and standardize an existing hack, and not as an absolute guarantee of correct behavior.


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1
Dependencies base (>=3 && <5), bytestring (>=0.9), vector (>=0.7) [details]
License BSD-3-Clause
Author Keegan McAllister <mcallister.keegan@gmail.com>
Maintainer Keegan McAllister <mcallister.keegan@gmail.com>
Category Data Structures
Source repo head: git clone git://github.com/kmcallister/spool.git
Uploaded by KeeganMcAllister at 2011-09-15T03:44:31Z
Distributions Debian:0.1, NixOS:0.1
Reverse Dependencies 7 direct, 3 indirect [details]
Downloads 5097 total (39 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for spool-0.1

[back to package description]
spool provides conversion between ByteString and Vector.Storable without
copying the underlying data.

Documentation is hosted at http://hackage.haskell.org/package/spool

To build the documentation yourself, run

  $ cabal configure && cabal haddock --hyperlink-source

This will produce HTML documentation under dist/doc/html/spool.