Copyright | (c) 2009 2010 Bryan O'Sullivan |
---|---|
License | BSD-style |
Maintainer | bos@serpentine.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Warning : this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!
Fusible
Stream
-oriented functions for converting between lazy
Text
and several common encodings.
Synopsis
- streamUtf8 :: OnDecodeError -> ByteString -> Stream Char
- streamUtf16LE :: OnDecodeError -> ByteString -> Stream Char
- streamUtf16BE :: OnDecodeError -> ByteString -> Stream Char
- streamUtf32LE :: OnDecodeError -> ByteString -> Stream Char
- streamUtf32BE :: OnDecodeError -> ByteString -> Stream Char
- unstream :: Stream Word8 -> ByteString
- module Data.Text.Internal.Encoding.Fusion.Common
Streaming
streamUtf8 :: OnDecodeError -> ByteString -> Stream Char Source #
O(n)
Convert a lazy
ByteString
into a 'Stream Char', using
UTF-8 encoding.
streamUtf16LE :: OnDecodeError -> ByteString -> Stream Char Source #
O(n)
Convert a
ByteString
into a 'Stream Char', using little
endian UTF-16 encoding.
streamUtf16BE :: OnDecodeError -> ByteString -> Stream Char Source #
O(n)
Convert a
ByteString
into a 'Stream Char', using big
endian UTF-16 encoding.
streamUtf32LE :: OnDecodeError -> ByteString -> Stream Char Source #
O(n)
Convert a
ByteString
into a 'Stream Char', using little
endian UTF-32 encoding.
streamUtf32BE :: OnDecodeError -> ByteString -> Stream Char Source #
O(n)
Convert a
ByteString
into a 'Stream Char', using big
endian UTF-32 encoding.
Unstreaming
unstream :: Stream Word8 -> ByteString Source #
O(n)
Convert a
Stream
Word8
to a lazy
ByteString
.