text-0.3: An efficient packed Unicode text type

Portabilityportable
Stabilityexperimental
Maintainerbos@serpentine.com, rtharper@aftereternity.co.uk, duncan@haskell.org

Data.Text.Lazy.Encoding.Fusion

Contents

Description

Fusible Stream-oriented functions for converting between lazy Text and several common encodings.

Synopsis

Streaming

streamUtf8 :: OnDecodeError -> ByteString -> Stream CharSource

O(n) Convert a lazy ByteString into a 'Stream Char', using UTF-8 encoding.

Unstreaming

unstream :: Stream Word8 -> ByteStringSource

O(n) Convert a Stream Word8 to a lazy ByteString.

Restreaming

restreamUtf8 :: Stream Char -> Stream Word8Source

O(n) Convert a Stream Char into a UTF-8 encoded Stream Word8.