-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Data encoding library -- -- Data encoding library currently providing Base16, Base32, Base32Hex, -- Base64, Base64Url, Base85, Python string escaping, Quoted-Printable, -- URL encoding, uuencode, xxencode, and yEncoding. @package dataenc @version 0.14.0.6 -- | Implemented as specified in RFC 4648 -- (http://tools.ietf.org/html/rfc4648). -- -- Further documentation and information can be found at -- http://www.haskell.org/haskellwiki/Library/Data_encoding. module Codec.Binary.Base32 -- | Data type for the incremental encoding functions. data EncIncData -- | a chunk of data to be encoded EChunk :: [Word8] -> EncIncData -- | the signal to the encoder that the stream of data is ending EDone :: EncIncData -- | Data type for the result of calling the incremental encoding -- functions. data EncIncRes i -- | a partial result together with the continuation to use for further -- encoding EPart :: i -> (EncIncData -> EncIncRes i) -> EncIncRes i -- | the final result of encoding (the response to EDone) EFinal :: i -> EncIncRes i -- | Incremental encoder function. encodeInc :: EncIncData -> EncIncRes String -- | Encode data. encode :: [Word8] -> String -- | Data type for the incremental decoding functions. data DecIncData i -- | a chunk of data to be decoded DChunk :: i -> DecIncData i -- | the signal to the decoder that the stream of data is ending DDone :: DecIncData i -- | Data type for the result of calling the incremental encoding -- functions. data DecIncRes i -- | a partial result together with the continuation to user for further -- decoding DPart :: [Word8] -> (DecIncData i -> DecIncRes i) -> DecIncRes i -- | the final result of decoding (the response to DDone) DFinal :: [Word8] -> i -> DecIncRes i -- | a partial result for a failed decoding, together with the remainder of -- the data passed in so far DFail :: [Word8] -> i -> DecIncRes i -- | Incremental decoder function. decodeInc :: DecIncData String -> DecIncRes String -- | Decode data. decode :: String -> Maybe [Word8] -- | Chop up a string in parts. -- -- The length given is rounded down to the nearest multiple of 8. chop :: Int -> String -> [String] -- | Concatenate the strings into one long string. unchop :: [String] -> String -- | Implemented as specified in RFC 4648 -- (http://tools.ietf.org/html/rfc4648). -- -- Further documentation and information can be found at -- http://www.haskell.org/haskellwiki/Library/Data_encoding. module Codec.Binary.Base32Hex -- | Data type for the incremental encoding functions. data EncIncData -- | a chunk of data to be encoded EChunk :: [Word8] -> EncIncData -- | the signal to the encoder that the stream of data is ending EDone :: EncIncData -- | Data type for the result of calling the incremental encoding -- functions. data EncIncRes i -- | a partial result together with the continuation to use for further -- encoding EPart :: i -> (EncIncData -> EncIncRes i) -> EncIncRes i -- | the final result of encoding (the response to EDone) EFinal :: i -> EncIncRes i -- | Incremental encoder function. encodeInc :: EncIncData -> EncIncRes String -- | Encode data. encode :: [Word8] -> String -- | Data type for the incremental decoding functions. data DecIncData i -- | a chunk of data to be decoded DChunk :: i -> DecIncData i -- | the signal to the decoder that the stream of data is ending DDone :: DecIncData i -- | Data type for the result of calling the incremental encoding -- functions. data DecIncRes i -- | a partial result together with the continuation to user for further -- decoding DPart :: [Word8] -> (DecIncData i -> DecIncRes i) -> DecIncRes i -- | the final result of decoding (the response to DDone) DFinal :: [Word8] -> i -> DecIncRes i -- | a partial result for a failed decoding, together with the remainder of -- the data passed in so far DFail :: [Word8] -> i -> DecIncRes i -- | Incremental decoder function. decodeInc :: DecIncData String -> DecIncRes String -- | Decode data. decode :: String -> Maybe [Word8] -- | Chop up a string in parts. -- -- See chop in Base32 for more details. chop :: Int -> String -> [String] -- | Concatenate the strings into one long string. -- -- See unchop in Codec.Binary.Base32 for more details. unchop :: [String] -> String -- | Implemented as specified in RFC 4648 -- (http://tools.ietf.org/html/rfc4648). -- -- Further documentation and information can be found at -- http://www.haskell.org/haskellwiki/Library/Data_encoding. module Codec.Binary.Base64 -- | Data type for the incremental encoding functions. data EncIncData -- | a chunk of data to be encoded EChunk :: [Word8] -> EncIncData -- | the signal to the encoder that the stream of data is ending EDone :: EncIncData -- | Data type for the result of calling the incremental encoding -- functions. data EncIncRes i -- | a partial result together with the continuation to use for further -- encoding EPart :: i -> (EncIncData -> EncIncRes i) -> EncIncRes i -- | the final result of encoding (the response to EDone) EFinal :: i -> EncIncRes i -- | Incremental encoder function. encodeInc :: EncIncData -> EncIncRes String -- | Encode data. encode :: [Word8] -> String -- | Data type for the incremental decoding functions. data DecIncData i -- | a chunk of data to be decoded DChunk :: i -> DecIncData i -- | the signal to the decoder that the stream of data is ending DDone :: DecIncData i -- | Data type for the result of calling the incremental encoding -- functions. data DecIncRes i -- | a partial result together with the continuation to user for further -- decoding DPart :: [Word8] -> (DecIncData i -> DecIncRes i) -> DecIncRes i -- | the final result of decoding (the response to DDone) DFinal :: [Word8] -> i -> DecIncRes i -- | a partial result for a failed decoding, together with the remainder of -- the data passed in so far DFail :: [Word8] -> i -> DecIncRes i -- | Incremental decoder function. decodeInc :: DecIncData String -> DecIncRes String -- | Decode data. decode :: String -> Maybe [Word8] -- | Chop up a string in parts. -- -- The length given is rounded down to the nearest multiple of 4. -- -- Notes: -- --
-- > encode [0, 10, 13, 110] -- "\\x00\\x0A\\x0Dn" -- > putStrLn $ encode [0, 10, 13, 110] -- \x00\x0A\x0Dn ---- -- It also properly handles escaping of a few characters that require it: -- --
-- > encode [34, 39, 92] -- "\\\"\\'\\\\" -- putStrLn $ encode [34, 39, 92] -- \"\'\\ ---- -- Further documentation and information can be found at -- http://www.haskell.org/haskellwiki/Library/Data_encoding. module Codec.Binary.PythonString -- | Data type for the incremental encoding functions. data EncIncData -- | a chunk of data to be encoded EChunk :: [Word8] -> EncIncData -- | the signal to the encoder that the stream of data is ending EDone :: EncIncData -- | Data type for the result of calling the incremental encoding -- functions. data EncIncRes i -- | a partial result together with the continuation to use for further -- encoding EPart :: i -> (EncIncData -> EncIncRes i) -> EncIncRes i -- | the final result of encoding (the response to EDone) EFinal :: i -> EncIncRes i -- | Incremental encoder function. encodeInc :: EncIncData -> EncIncRes String -- | Encode data. encode :: [Word8] -> String -- | Data type for the incremental decoding functions. data DecIncData i -- | a chunk of data to be decoded DChunk :: i -> DecIncData i -- | the signal to the decoder that the stream of data is ending DDone :: DecIncData i -- | Data type for the result of calling the incremental encoding -- functions. data DecIncRes i -- | a partial result together with the continuation to user for further -- decoding DPart :: [Word8] -> (DecIncData i -> DecIncRes i) -> DecIncRes i -- | the final result of decoding (the response to DDone) DFinal :: [Word8] -> i -> DecIncRes i -- | a partial result for a failed decoding, together with the remainder of -- the data passed in so far DFail :: [Word8] -> i -> DecIncRes i -- | Incremental decoder function. decodeInc :: DecIncData String -> DecIncRes String -- | Decode data. decode :: String -> Maybe [Word8] -- | Chop up a string in parts. chop :: Int -> String -> [String] -- | Concatenate the list of strings into one long string. unchop :: [String] -> String -- | Implementation based on the specification found at -- http://yence.sourceforge.net/docs/protocol/version1_3_draft.html. -- -- Further documentation and information can be found at -- http://www.haskell.org/haskellwiki/Library/Data_encoding. module Codec.Binary.Yenc -- | Data type for the incremental encoding functions. data EncIncData -- | a chunk of data to be encoded EChunk :: [Word8] -> EncIncData -- | the signal to the encoder that the stream of data is ending EDone :: EncIncData -- | Data type for the result of calling the incremental encoding -- functions. data EncIncRes i -- | a partial result together with the continuation to use for further -- encoding EPart :: i -> (EncIncData -> EncIncRes i) -> EncIncRes i -- | the final result of encoding (the response to EDone) EFinal :: i -> EncIncRes i -- | Incremental encoder function. encodeInc :: EncIncData -> EncIncRes [Word8] -- | Encode data. encode :: [Word8] -> [Word8] -- | Data type for the incremental decoding functions. data DecIncData i -- | a chunk of data to be decoded DChunk :: i -> DecIncData i -- | the signal to the decoder that the stream of data is ending DDone :: DecIncData i -- | Data type for the result of calling the incremental encoding -- functions. data DecIncRes i -- | a partial result together with the continuation to user for further -- decoding DPart :: [Word8] -> (DecIncData i -> DecIncRes i) -> DecIncRes i -- | the final result of decoding (the response to DDone) DFinal :: [Word8] -> i -> DecIncRes i -- | a partial result for a failed decoding, together with the remainder of -- the data passed in so far DFail :: [Word8] -> i -> DecIncRes i -- | Incremental decoder function. decodeInc :: DecIncData [Word8] -> DecIncRes [Word8] -- | Decode data. decode :: [Word8] -> Maybe [Word8] -- | Chop up a string in parts. chop :: Int -> [Word8] -> [[Word8]] -- | Concatenate the strings into one long string. unchop :: [[Word8]] -> [Word8] -- | Implemented as specified in RFC 4648 -- (http://tools.ietf.org/html/rfc4648). -- -- Further documentation and information can be found at -- http://www.haskell.org/haskellwiki/Library/Data_encoding. module Codec.Binary.Base16 -- | Data type for the incremental encoding functions. data EncIncData -- | a chunk of data to be encoded EChunk :: [Word8] -> EncIncData -- | the signal to the encoder that the stream of data is ending EDone :: EncIncData -- | Data type for the result of calling the incremental encoding -- functions. data EncIncRes i -- | a partial result together with the continuation to use for further -- encoding EPart :: i -> (EncIncData -> EncIncRes i) -> EncIncRes i -- | the final result of encoding (the response to EDone) EFinal :: i -> EncIncRes i -- | Incremental encoder function. encodeInc :: EncIncData -> EncIncRes String -- | Encode data. encode :: [Word8] -> String -- | Data type for the incremental decoding functions. data DecIncData i -- | a chunk of data to be decoded DChunk :: i -> DecIncData i -- | the signal to the decoder that the stream of data is ending DDone :: DecIncData i -- | Data type for the result of calling the incremental encoding -- functions. data DecIncRes i -- | a partial result together with the continuation to user for further -- decoding DPart :: [Word8] -> (DecIncData i -> DecIncRes i) -> DecIncRes i -- | the final result of decoding (the response to DDone) DFinal :: [Word8] -> i -> DecIncRes i -- | a partial result for a failed decoding, together with the remainder of -- the data passed in so far DFail :: [Word8] -> i -> DecIncRes i -- | Incremental decoder function. decodeInc :: DecIncData String -> DecIncRes String -- | Decode data. decode :: String -> Maybe [Word8] -- | Chop up a string in parts. -- -- The length given is rounded down to the nearest multiple of 2. chop :: Int -> String -> [String] -- | Concatenate the strings into one long string. unchop :: [String] -> String -- | This module exposes several instances of DataCodec, one for -- each data encoding implemented in the library without causing the name -- clashing that would result from importing the individual encoding -- modules. -- -- Further documentation and information can be found at -- http://www.haskell.org/haskellwiki/Library/Data_encoding. module Codec.Binary.DataEncoding -- | Used to group a specific data encoding's functions. data DataCodec -- | Base16 encoding, see Codec.Binary.Base16 for more details on -- the individual functions. base16 :: DataCodec -- | Base32 encoding, see Codec.Binary.Base32 for more details on -- the individual functions. base32 :: DataCodec -- | Base32Hex encoding, see Codec.Binary.Base32Hex for more details -- on the individual functions. base32Hex :: DataCodec -- | Base64 encoding, see Codec.Binary.Base64 for more details on -- the individual functions. base64 :: DataCodec -- | Base64Url encoding, see Codec.Binary.Base64Url for more details -- on the individual functions. base64Url :: DataCodec -- | Base85 encoding, see Codec.Binary.Base85 for more details on -- the individual functions. base85 :: DataCodec chop :: DataCodec -> Int -> String -> [String] decode :: DataCodec -> String -> Maybe [Word8] encode :: DataCodec -> [Word8] -> String -- | Quoted-printable, see Codec.Binary.PythonString for more -- details on the individual functions. py :: DataCodec -- | Quoted-printable, see Codec.Binary.QuotedPrintable for more -- details on the individual functions. qp :: DataCodec unchop :: DataCodec -> [String] -> String -- | URL encoding, see Codec.Binary.Url for more details on the -- individual functions. url :: DataCodec -- | Uuencoding, see Codec.Binary.Uu for more details on the -- individual functions. uu :: DataCodec -- | Xxencoding, see Codec.Binary.Xx for more details on the -- individual functions. xx :: DataCodec