HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulebase64-bytestring-1.2.1.0Haskell2010

Data.ByteString.Base64

Fast and efficient encoding and decoding of base64-encoded strings.

  • 3 values
valueencode :: ByteString -> ByteString
#

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

Decode a base64-encoded string. This function strictly follows the specification in RFC 4648.

(Note: this means that even "\n" and "\r\n" as line breaks are rejected rather than ignored. If you are using this in the context of a standard that overrules RFC 4648 such as HTTP multipart mime bodies, consider using decodeLenient.)

Decode a base64-encoded string. This function is lenient in following the specification from RFC 4648, and will not generate parse errors no matter how poor its input.