base16

RFC 4648-compliant Base16 encodings/decodings https://github.com/emilypi/base16

Version on this page:0.2.1.0
LTS Haskell 16.19:0.2.1.0
Stackage Nightly 2020-10-20:0.3.0.1@rev:2
Latest on Hackage:0.3.0.1@rev:2

See all snapshots base16 appears in

BSD-3-Clause licensed by Emily Pillmore
Maintained by emilypi@cohomolo.gy

Module documentation for 0.2.1.0

This version can be pinned in stack with:base16-0.2.1.0@sha256:62e9abde29287913a775ec658b62ecba20270b9e1ac0a008e6acb4616b79a22d,2183

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 are supported for Hex alphabet 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.
  • Optics for handling more complex structures with Base64 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.

Changes

Revision history for base16

0.2.0.1

  • Improved performance. Decode and encode are now 3.5x-5x the next best lib.

0.2.0

  • Add lenient decoders
  • Fix bug in Text decodeBase16 which failed on invalid UTF-8 values as a result of decoding
  • Add decodeBase16With combinators

0.1.3

  • Add lazy variants for Text and ByteString values

0.1.2.1 – 2020-02-17

  • Documentation now references correct RFC section

0.1.2 – 2020-02-17

  • Unmask loops - now correct.

0.1.1 – 2020-02-17

  • Mask Word32 and Word64 loops (flaky)

0.1.0.0 – 2020-02-16

  • First version. Released on an unsuspecting world.
Used by 1 package in lts-16.18(full list with versions):