-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Fast base16 (hex) encoding and decoding for ByteStrings
--   
--   This package provides support for encoding and decoding binary data
--   according to <tt>base16</tt> (see also <a>RFC 4648</a>) for strict
--   (see <a>Data.ByteString.Base16</a>) and lazy <tt>ByteString</tt>s (see
--   <a>Data.ByteString.Base16.Lazy</a>).
--   
--   See also the <a>base-encoding</a> package which provides an uniform
--   API providing conversion paths between more binary and textual types.
@package base16-bytestring
@version 0.1.1.7


-- | Fast and efficient encoding and decoding of base16-encoded strings.
module Data.ByteString.Base16

-- | Encode a string into base16 form. The result will always be a multiple
--   of 2 bytes in length.
--   
--   Example:
--   
--   <pre>
--   encode "foo"  == "666f6f"
--   </pre>
encode :: ByteString -> ByteString

-- | Decode a string from base16 form. The first element of the returned
--   tuple contains the decoded data. The second element starts at the
--   first invalid base16 sequence in the original string.
--   
--   Examples:
--   
--   <pre>
--   decode "666f6f"  == ("foo", "")
--   decode "66quux"  == ("f", "quux")
--   decode "666quux" == ("f", "6quux")
--   </pre>
decode :: ByteString -> (ByteString, ByteString)


-- | Fast and efficient encoding and decoding of base16-encoded strings.
module Data.ByteString.Base16.Lazy

-- | Encode a string into base16 form. The result will always be a multiple
--   of 2 bytes in length.
--   
--   Example:
--   
--   <pre>
--   encode "foo"  == "666f6f"
--   </pre>
encode :: ByteString -> ByteString

-- | Decode a string from base16 form. The first element of the returned
--   tuple contains the decoded data. The second element starts at the
--   first invalid base16 sequence in the original string.
--   
--   This function operates as lazily as possible over the input chunks.
--   
--   Examples:
--   
--   <pre>
--   decode "666f6f"  == ("foo", "")
--   decode "66quux"  == ("f", "quux")
--   decode "666quux" == ("f", "6quux")
--   </pre>
decode :: ByteString -> (ByteString, ByteString)
