View Source Base85 (Base85 v0.3.0)

Implements some 85-character encodings.

While Base64 is well known and quite functional, it is not the most efficient encoding for turning binary data into a stream of ASCII-friendly text. This module implements some Base85 encodings. As the name suggests, it encodes data using a numbering system with a radix of 85. This number is chosen because it approximates the maximum number of characters in the "safe" range that can be effectively used.

While it is possible to squeeze out a few more, it doesn't actually save any characters. So, from an efficiency standpoint, Base85 is about as good as it gets. And the small number of characters you have left over, you can tune the generated output to avoid characters that are "dangerous" in certain transports.

This module holds references to the primary entrypoints for using this library.

Summary

Functions

decode(bin, opts \\ [])

See Base85.Decode.decode/2.

decode!(bin, opts \\ [])

See Base85.Decode.decode!/2.

encode(bin, opts \\ [])

See Base85.Encode.encode/2.

encode!(bin, opts \\ [])

See Base85.Encode.encode!/2.