Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class Unpack s where
- w2c :: Word8 -> Char
- c2w :: Char -> Word8
- decodeBytes :: ByteString -> Text
- encodeBytes :: Text -> ByteString
- decompressGzip :: ByteString -> ByteString
Documentation
Instances
Unpack String Source # | |
Unpack ByteString Source # | |
Defined in Bio.Util.Text unpack :: ByteString -> String Source # | |
Unpack ByteString Source # | |
Defined in Bio.Util.Text unpack :: ByteString -> String Source # | |
Unpack Text Source # | |
decodeBytes :: ByteString -> Text Source #
Converts Bytes
into Text
. This uses UTF8, but if there is an
error, it pretends it was Latin1. Evil as this is, it tends to Just
Work on files where nobody ever wasted a thought on encodings.
encodeBytes :: Text -> ByteString Source #
Converts Text
into Bytes
. This uses UTF8.
decompressGzip :: ByteString -> ByteString Source #
Decompresses Gzip or Bgzf and passes everything else on. In reality, it simply decompresses Gzip, and when done, looks for another Gzip stream. Since there is a small chance to attempt decompression of an uncompressed stream, the original data is returned in case of an error.