A performant, featureful RFC 4648 and 7049-compliant Base64 implementation


Keywords
data, library, Propose Tags, Skip to Readme, , Index, Quick Jump, Data.Base64.Types, Data.ByteString.Base64, Data.ByteString.Base64.URL, Data.ByteString.Lazy.Base64, Data.ByteString.Lazy.Base64.URL, Data.ByteString.Short.Base64, Data.ByteString.Short.Base64.URL, Data.Text.Encoding.Base64, Data.Text.Encoding.Base64.Error, Data.Text.Encoding.Base64.URL, Data.Text.Lazy.Encoding.Base64, Data.Text.Lazy.Encoding.Base64.URL, Data.Text.Short.Encoding.Base64, Data.Text.Short.Encoding.Base64.URL, base64-1.0.tar.gz, browse, Package description, Package maintainers, topos, SofiaMA, edit package information , 0, 0.0.1.0, 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.1.0, 0.3.1.1, 0.4.0, 0.4.1, 0.4.2, 0.4.2.1, 0.4.2.2, 0.4.2.3, base64-lens
License
BSD-3-Clause
Install
cabal install base64-1.0

Documentation

Base64

Build Status Hackage

Base64 encoding and decodings.

For the companion optics and pattern synonyms, see base64-lens.

Summary

The following types are supported for both std, padded url-safe, and unpadded url-safe alphabets:

  • Data.ByteString
  • Data.ByteString.Lazy
  • Data.ByteString.Short
  • Data.Text
  • Data.Text.Lazy
  • Data.Text.Short

Additionally this library has

  • Better performance than base64-bytestring for encode and decode.
  • Optics for handling more complex structures with Base64 representations via the base64-lens package
  • Checks for both validity and correctness of Base64 and Base64url encodings
  • Rejects non-canonical encodings that do not roundtrip in other base64 libraries like ZE==.

There are no dependencies aside from those bundled with GHC, text-short, and the ghc-byteorder re-export.