-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Data encoding library
--
-- Data encoding library currently providing Uuencode, Base64, Base64Url,
-- Base32, Base32Hex, Base16, Base85, and yEncoding.
@package dataenc
@version 0.12
-- | 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]
-- | 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. The -1 comes from the need to prepend
-- the length. 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
-- | 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
encode :: DataCodec -> [Word8] -> String
decode :: DataCodec -> String -> Maybe [Word8]
decode' :: DataCodec -> String -> [Maybe Word8]
chop :: DataCodec -> Int -> String -> [String]
unchop :: DataCodec -> [String] -> String
-- | 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
-- | Uuencoding, see Codec.Binary.Uu for more details on the
-- individual functions.
uu :: DataCodec