Data.ByteString.Base64.Lazy

base64-bytestring-1.0.0.0: Fast base64 encoding and deconding for ByteStrings

Portability | GHC
Stability | experimental
Maintainer | bos@serpentine.com
Safe Haskell | Trustworthy

Data.ByteString.Base64.Lazy

Description

Fast and efficient encoding and decoding of base64-encoded lazy bytestrings.

Synopsis

- encode :: ByteString -> ByteString
- decode :: ByteString -> Either String ByteString
- decodeLenient :: ByteString -> ByteString

# Documentation

encode :: ByteString -> ByteString

Encode a string into base64 form. The result will always be a multiple of 4 bytes in length.

decode :: ByteString -> Either String ByteString

Decode a base64-encoded string. This function strictly follows the specification in RFC 4648, http://www.apps.ietf.org/rfc/rfc4648.html.

decodeLenient :: ByteString -> ByteString

Decode a base64-encoded string. This function is lenient in following the specification from RFC 4648, http://www.apps.ietf.org/rfc/rfc4648.html, and will not generate parse errors no matter how poor its input.