-- 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.13.0.3
-- | 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
-- | Encode data.
encode :: [Word8] -> [Word8]
-- | Decode data (strict).
decode :: [Word8] -> Maybe [Word8]
-- | Decode data (lazy).
decode' :: [Word8] -> [Maybe Word8]
-- | Chop up a string in parts.
chop :: Int -> [Word8] -> [[Word8]]
-- | Concatenate the strings into one long string.
unchop :: [[Word8]] -> [Word8]
-- | Implementation of python escaping.
--
-- This implementation encodes non-printable characters (0x00-0x1f,
-- 0x7f-0xff) to hex-value characters ('\xhh') while leaving printable
-- characters as such:
--
--
-- > 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
-- | Encode data.
encode :: [Word8] -> String
-- | Decode data (strict).
decode :: String -> Maybe [Word8]
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 of Quoted-Printable based on RFC 2045
-- (http://tools.ietf.org/html/rfc2045).
--
-- This encoding encodes _everything_ that is passed in, it will not try
-- to guess the native line ending for your architecture. In other words,
-- if you are using this to encode text you need to split it into
-- separate lines before encoding and chopping it up.
--
-- Further documentation and information can be found at
-- http://www.haskell.org/haskellwiki/Library/Data_encoding.
module Codec.Binary.QuotedPrintable
-- | Encode data.
encode :: [Word8] -> String
-- | Decode data (strict).
decode :: String -> Maybe [Word8]
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
-- | Xxencoding is obsolete but still included for completeness. Further
-- information on the encoding can be found at
-- http://en.wikipedia.org/wiki/Xxencode. It should be noted that
-- this implementation performs no padding, due to the splitting up
-- between encoding and chopping.
--
-- Further documentation and information can be found at
-- http://www.haskell.org/haskellwiki/Library/Data_encoding.
module Codec.Binary.Xx
-- | Encode data.
encode :: [Word8] -> String
-- | Decode data (strict).
decode :: String -> Maybe [Word8]
-- | Decode data (lazy).
decode' :: String -> [Maybe Word8]
-- | Chop up a string in parts. Each string in the resulting list is
-- prepended with the length according to the xxencode "specificiation".
--
-- Notes:
--
--
-- - The length of the strings in the result will be (n -1)
-- div 4 * 4 + 1. The -1 comes from the need to
-- prepend the length (which explains the final +1). Keeping it
-- to a multiple of 4 means that strings returned from encode can
-- be chopped without requiring any changes.
--
chop :: Int -> String -> [String]
-- | Concatenate the strings into one long string. Each string is assumed
-- to be prepended with the length according to the xxencode
-- specification.
unchop :: [String] -> String
-- | Uuencoding is notoriously badly specified. This implementation is
-- compatible with the GNU Sharutils
-- (http://www.gnu.org/software/sharutils/).
--
-- Further documentation and information can be found at
-- http://www.haskell.org/haskellwiki/Library/Data_encoding.
module Codec.Binary.Uu
-- | Encode data.
encode :: [Word8] -> String
-- | Decode data (strict).
decode :: String -> Maybe [Word8]
-- | Decode data (lazy).
decode' :: String -> [Maybe Word8]
-- | Chop up a string in parts. Each string in the resulting list is
-- prepended with the length according to the uuencode "specificiation".
--
-- Notes:
--
--
-- - The length of the strings in the result will be (n -1)
-- div 4 * 4 + 1. The -1 comes from the need to
-- prepend the length (which explains the final +1). Keeping it
-- to a multiple of 4 means that strings returned from encode can
-- be chopped without requiring any changes.
-- - The length of lines in GNU's sharutils is 61.
--
chop :: Int -> String -> [String]
-- | Concatenate the strings into one long string. Each string is assumed
-- to be prepended with the length according to the uuencode
-- specification.
unchop :: [String] -> String
-- | URL encoding, sometimes referred to as URI encoding or percent
-- encoding. Implemented based on RFC 3986
-- (http://tools.ietf.org/html/rfc3986).
--
-- Further documentation and information can be found at
-- http://www.haskell.org/haskellwiki/Library/Data_encoding.
module Codec.Binary.Url
-- | Encode data.
encode :: [Word8] -> String
-- | Decode data (strict).
decode :: String -> Maybe [Word8]
-- | Decode data (lazy).
decode' :: String -> [Maybe Word8]
-- | Chop up a string in parts.
chop :: Int -> String -> [String]
-- | Concatenate the strings into one long string
unchop :: [String] -> String
-- | Implemented as described at
-- http://en.wikipedia.org/wiki/Ascii85.
--
-- Further documentation and information can be found at
-- http://www.haskell.org/haskellwiki/Library/Data_encoding.
module Codec.Binary.Base85
-- | Encode data.
--
-- The result will not be enclosed in <~ ~>.
encode :: [Word8] -> String
-- | Decode data (strict).
--
-- The input must not be enclosed in <~ ~>.
decode :: String -> Maybe [Word8]
-- | Decode data (lazy).
--
-- The input must not be enclosed in <~ ~>.
decode' :: String -> [Maybe Word8]
-- | Chop up a string in parts.
--
-- The length given is rounded down to the nearest multiple of 5.
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.Base64
-- | Encode data.
encode :: [Word8] -> String
-- | Decode data (strict).
decode :: String -> Maybe [Word8]
-- | Decode data (lazy).
decode' :: String -> [Maybe Word8]
-- | Chop up a string in parts.
--
-- The length given is rounded down to the nearest multiple of 4.
--
-- Notes:
--
--
-- - PEM requires lines that are 64 characters long.
-- - MIME requires lines that are at most 76 characters long.
--
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.Base64Url
-- | Encode data.
encode :: [Word8] -> String
-- | Decode data (strict).
decode :: String -> Maybe [Word8]
-- | Decode data (lazy).
decode' :: String -> [Maybe Word8]
-- | Chop up a string in parts.
--
-- See chop in Base64 for more details.
chop :: Int -> String -> [String]
-- | Concatenate the strings into one long string.
--
-- See unchop in Codec.Binary.Base64 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.Base32
-- | Encode data.
encode :: [Word8] -> String
-- | Decode data (strict).
decode :: String -> Maybe [Word8]
-- | Decode data (lazy).
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
-- | Encode data.
encode :: [Word8] -> String
-- | Decode data (strict).
decode :: String -> Maybe [Word8]
-- | Decode data (lazy).
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.Base16
-- | Encode data.
encode :: [Word8] -> String
-- | Decode data (strict).
decode :: String -> Maybe [Word8]
-- | Decode data (lazy).
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]
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