base64: Fast RFC 4648-compliant Base64 encoding

[ bsd3, data, library ] [ Propose Tags ]

RFC 4648-compliant padded and unpadded base64 and base64url encoding and decoding. This library provides performant encoding and decoding primitives, as well as support for textual values.


[Skip to Readme]
Versions [faq] 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 (info)
Change log CHANGELOG.md
Dependencies base (>=4.10 && <5), bytestring (>=0.10 && <0.12), deepseq (>=1.4.3.0 && <1.4.5.0), ghc-byteorder (>=4.11.0.0 && <4.12), text (==1.2.*), text-short (==0.1.*) [details]
License BSD-3-Clause
Copyright (c) 2019-2020 Emily Pillmore
Author Emily Pillmore
Maintainer emilypi@cohomolo.gy
Revised Revision 1 made by topos at 2020-09-17T17:17:43Z
Category Data
Home page https://github.com/emilypi/base64
Bug tracker https://github.com/emilypi/base64/issues
Source repo head: git clone https://github.com/emilypi/base64.git
Uploaded by topos at 2020-07-03T22:50:23Z
Distributions NixOS:0.4.2.2
Downloads 4965 total (392 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-07-03 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for base64-0.4.2.2

[back to package description]

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.