RFC 4648-compliant Base64
Go to file
2024-08-28 13:21:53 -06:00
.github/workflows Bump for ghc 9.10.1 (#62) 2024-05-31 11:23:04 -06:00
benchmarks [Bugfix] bug in 32-bit peek (#57) 2023-12-07 17:28:12 -07:00
src/Data Add docs on RFC 2045 (#64) 2024-08-28 13:21:53 -06:00
test [Bugfix] bug in 32-bit peek (#57) 2023-12-07 17:28:12 -07:00
.gitignore Bump bounds (#54) 2023-10-22 15:24:48 -06:00
base64.cabal Bump for ghc 9.10.1 (#62) 2024-05-31 11:23:04 -06:00
cabal.project perf regressions 2020-07-03 16:07:31 -04:00
cabal.project.local [Bugfix] bug in 32-bit peek (#57) 2023-12-07 17:28:12 -07:00
CHANGELOG.md update cabal, changelog, migration (#58) 2024-01-10 22:43:08 -07:00
CONTRIBUTING.md Update CONTRIBUTING.md 2020-02-04 21:08:05 -05:00
default.nix update nix 2020-07-23 11:34:13 -04:00
LICENSE initial 2019-11-06 18:07:27 -05:00
MIGRATION-1.0.md update benchmarks 2024-01-11 15:33:23 -07:00
README.md update badge 2023-04-26 12:26:52 -06:00
Setup.hs initial 2019-11-06 18:07:27 -05:00

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.