base16: Fast RFC 4648-compliant Base16 encoding

[ bsd3, data, library ] [ Propose Tags ] [ Report a vulnerability ]

RFC 4648-compliant Base16 encodings and decodings. This library provides performant encoding and decoding primitives, as well as support for textual values.


[Skip to Readme]

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

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1, 0.1.2, 0.1.2.1, 0.1.3.0, 0.2.0.0, 0.2.0.1, 0.2.1.0, 0.3.0.0, 0.3.0.1, 0.3.0.2, 0.3.1.0, 0.3.2.0, 0.3.2.1, 1.0
Change log CHANGELOG.md
Dependencies base (>=4.14 && <4.21), bytestring (>=0.11 && <0.13), deepseq (>=1.4.4.0 && <1.6), primitive (>=0.6 && <0.10), text (>=2.0 && <2.2), text-short (>=0.1 && <0.2) [details]
Tested with ghc ==8.10.7 || ==9.0.2 || ==9.2.5 || ==9.4.5 || ==9.6.4 || ==9.8.1
License BSD-3-Clause
Copyright (c) 2020-2023 Emily Pillmore
Author Emily Pillmore
Maintainer emilypi@cohomolo.gy
Revised Revision 2 made by topos at 2024-10-08T23:38:17Z
Category Data
Home page https://github.com/emilypi/base16
Bug tracker https://github.com/emilypi/base16/issues
Source repo head: git clone https://github.com/emilypi/base16.git
Uploaded by topos at 2023-06-22T21:04:55Z
Distributions LTSHaskell:1.0, NixOS:1.0, Stackage:1.0
Reverse Dependencies 11 direct, 26 indirect [details]
Downloads 9698 total (117 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-06-22 [all 1 reports]

Readme for base16-1.0

[back to package description]

Base16

Build Status Hackage

RFC 4648-compliant Base16 encoding and decoding.

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

Summary

The following types have supported codecs:

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

Additionally this library has

  • Much better performance than base16-bytestring for encode and decode, with a more conventional api.
  • Support for mixed-case hex decoding (defaults to lower-case encoding by convention)
  • Optics for handling more complex structures with Base16 representations via the base16-lens package
  • Checks for both validity and correctness of Base16 encodings.

There are no dependencies aside from those bundled with GHC.