reedsolomon-0.0.4.2: Reed-Solomon Erasure Coding in Haskell

Copyright(C) 2015 Nicolas Trangez
LicenseMIT (see the file LICENSE)
MaintainerNicolas Trangez <ikke@nicolast.be>
Stabilityprovisional
Safe HaskellNone
LanguageHaskell2010
Extensions
  • RankNTypes
  • ExplicitForAll

Data.Vector.Storable.ByteString

Contents

Description

This module provides some conversion routines between ByteStrings and Vectors of Word8 bytes, as used throughout the library.

It also provides a Lens-style isomorphism.

Synopsis

Conversion routines

fromByteString :: ByteString -> Vector Word8 Source

Convert a ByteString into a Vector of bytes.

No data is copied, so in-place mutations break referential transparency.

O(1).

toByteString :: Vector Word8 -> ByteString Source

Convert a Vector of bytes into a ByteString.

No data is copied, so in-place mutations break referential transparency.

O(1).

Isomorphism

type Iso s t a b = forall p f. (Profunctor p, Functor f) => p a (f b) -> p s (f t) Source

The type of an isomorphism a la Iso.

type Iso' s a = Iso s s a a Source

iso :: Iso' ByteString (Vector Word8) Source

An Iso between a ByteString and a Vector of bytes.