-- 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.7


-- | Uuencoding is notoriously badly specified. This implementation is
--   compatible with the GNU Sharutils
--   (<a>http://www.gnu.org/software/sharutils/</a>).
--   
--   Further documentation and information can be found at
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
module Codec.Binary.Uu

-- | 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 <a>EDone</a>)
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 <a>DDone</a>)
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. Each string in the resulting list is
--   prepended with the length according to the uuencode "specificiation".
--   
--   <i>Notes:</i>
--   
--   <ul>
--   <li>The length of the strings in the result will be <tt>(n -1)
--   <a>div</a> 4 * 4 + 1</tt>. The <tt>-1</tt> comes from the need to
--   prepend the length (which explains the final <tt>+1</tt>). Keeping it
--   to a multiple of 4 means that strings returned from <a>encode</a> can
--   be chopped without requiring any changes.</li>
--   <li>The length of lines in GNU's sharutils is 61.</li>
--   </ul>
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


-- | Xxencoding is obsolete but still included for completeness. Further
--   information on the encoding can be found at
--   <a>http://en.wikipedia.org/wiki/Xxencode</a>. 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
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
module Codec.Binary.Xx

-- | 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 <a>EDone</a>)
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 <a>DDone</a>)
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. Each string in the resulting list is
--   prepended with the length according to the xxencode "specificiation".
--   
--   <i>Notes:</i>
--   
--   <ul>
--   <li>The length of the strings in the result will be <tt>(n -1)
--   <a>div</a> 4 * 4 + 1</tt>. The <tt>-1</tt> comes from the need to
--   prepend the length (which explains the final <tt>+1</tt>). Keeping it
--   to a multiple of 4 means that strings returned from <a>encode</a> can
--   be chopped without requiring any changes.</li>
--   </ul>
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


-- | Implementation based on the specification found at
--   <a>http://yence.sourceforge.net/docs/protocol/version1_3_draft.html</a>.
--   
--   Further documentation and information can be found at
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
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 <a>EDone</a>)
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 <a>DDone</a>)
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]


-- | URL encoding, sometimes referred to as URI encoding or percent
--   encoding. Implemented based on RFC 3986
--   (<a>http://tools.ietf.org/html/rfc3986</a>).
--   
--   Further documentation and information can be found at
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
module Codec.Binary.Url

-- | 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 <a>EDone</a>)
EFinal :: i -> EncIncRes i

-- | Incremental decoder function.
encodeInc :: EncIncData -> EncIncRes String

-- | Encode data.
encode :: [Word8] -> String

-- | Data type for the incremental decoding functions.
data DecIncData i

-- | Data type for the result of calling the incremental encoding
--   functions.
data 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 strings into one long string
unchop :: [String] -> String


-- | Implementation of Quoted-Printable based on RFC 2045
--   (<a>http://tools.ietf.org/html/rfc2045</a>).
--   
--   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
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
module Codec.Binary.QuotedPrintable

-- | 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 <a>EDone</a>)
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 <a>DDone</a>)
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 of python escaping.
--   
--   This implementation encodes non-printable characters (0x00-0x1f,
--   0x7f-0xff) to hex-value characters ('\xhh') while leaving printable
--   characters as such:
--   
--   <pre>
--   &gt; encode [0, 10, 13, 110]
--   "\\x00\\x0A\\x0Dn"
--   &gt; putStrLn $ encode [0, 10, 13, 110]
--   \x00\x0A\x0Dn
--   </pre>
--   
--   It also properly handles escaping of a few characters that require it:
--   
--   <pre>
--   &gt; encode [34, 39, 92]
--   "\\\"\\'\\\\"
--   putStrLn $ encode [34, 39, 92]
--   \"\'\\
--   </pre>
--   
--   Further documentation and information can be found at
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
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 <a>EDone</a>)
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 <a>DDone</a>)
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


-- | Implemented as described at
--   <a>http://en.wikipedia.org/wiki/Ascii85</a>.
--   
--   Further documentation and information can be found at
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
module Codec.Binary.Base85

-- | 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 <a>EDone</a>)
EFinal :: i -> EncIncRes i

-- | Incremental encoder function.
encodeInc :: EncIncData -> EncIncRes String

-- | Encode data.
--   
--   The result will not be enclosed in &lt;~ ~&gt;.
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 <a>DDone</a>)
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.
--   
--   The input must not be enclosed in &lt;~ ~&gt;.
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
--   (<a>http://tools.ietf.org/html/rfc4648</a>).
--   
--   Further documentation and information can be found at
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
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 <a>EDone</a>)
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 <a>DDone</a>)
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.
--   
--   <i>Notes:</i>
--   
--   <ul>
--   <li>PEM requires lines that are 64 characters long.</li>
--   <li>MIME requires lines that are at most 76 characters long.</li>
--   </ul>
chop :: Int -> String -> [String]

-- | Concatenate the strings into one long string.
unchop :: [String] -> String


-- | Implemented as specified in RFC 4648
--   (<a>http://tools.ietf.org/html/rfc4648</a>).
--   
--   Further documentation and information can be found at
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
module Codec.Binary.Base64Url

-- | 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 <a>EDone</a>)
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 <a>DDone</a>)
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 encoder function.
decodeInc :: DecIncData String -> DecIncRes String

-- | Decode data.
decode :: String -> Maybe [Word8]

-- | Chop up a string in parts.
--   
--   See <a>chop</a> in <a>Base64</a> for more details.
chop :: Int -> String -> [String]

-- | Concatenate the strings into one long string.
--   
--   See <a>unchop</a> in <a>Codec.Binary.Base64</a> for more details.
unchop :: [String] -> String


-- | Implemented as specified in RFC 4648
--   (<a>http://tools.ietf.org/html/rfc4648</a>).
--   
--   Further documentation and information can be found at
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
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 <a>EDone</a>)
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 <a>DDone</a>)
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
--   (<a>http://tools.ietf.org/html/rfc4648</a>).
--   
--   Further documentation and information can be found at
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
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 <a>EDone</a>)
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 <a>DDone</a>)
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 <a>chop</a> in <a>Base32</a> for more details.
chop :: Int -> String -> [String]

-- | Concatenate the strings into one long string.
--   
--   See <a>unchop</a> in <a>Codec.Binary.Base32</a> for more details.
unchop :: [String] -> String


-- | Implemented as specified in RFC 4648
--   (<a>http://tools.ietf.org/html/rfc4648</a>).
--   
--   Further documentation and information can be found at
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
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 <a>EDone</a>)
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 <a>DDone</a>)
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 <a>DataCodec</a>, 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
--   <a>http://www.haskell.org/haskellwiki/Library/Data_encoding</a>.
module Codec.Binary.DataEncoding

-- | Used to group a specific data encoding's functions.
data DataCodec

-- | Base16 encoding, see <a>Codec.Binary.Base16</a> for more details on
--   the individual functions.
base16 :: DataCodec

-- | Base32 encoding, see <a>Codec.Binary.Base32</a> for more details on
--   the individual functions.
base32 :: DataCodec

-- | Base32Hex encoding, see <a>Codec.Binary.Base32Hex</a> for more details
--   on the individual functions.
base32Hex :: DataCodec

-- | Base64 encoding, see <a>Codec.Binary.Base64</a> for more details on
--   the individual functions.
base64 :: DataCodec

-- | Base64Url encoding, see <a>Codec.Binary.Base64Url</a> for more details
--   on the individual functions.
base64Url :: DataCodec

-- | Base85 encoding, see <a>Codec.Binary.Base85</a> 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 <a>Codec.Binary.PythonString</a> for more
--   details on the individual functions.
py :: DataCodec

-- | Quoted-printable, see <a>Codec.Binary.QuotedPrintable</a> for more
--   details on the individual functions.
qp :: DataCodec
unchop :: DataCodec -> [String] -> String

-- | URL encoding, see <a>Codec.Binary.Url</a> for more details on the
--   individual functions.
url :: DataCodec

-- | Uuencoding, see <a>Codec.Binary.Uu</a> for more details on the
--   individual functions.
uu :: DataCodec

-- | Xxencoding, see <a>Codec.Binary.Xx</a> for more details on the
--   individual functions.
xx :: DataCodec
