1 unstable release

0.1.1 Nov 7, 2021
0.1.0 Oct 27, 2021

#979 in Command line utilities

AGPL-3.0-or-later

60KB
1.5K SLoC

Base116

Base116 is like Base85, but it increases data size by only 7/6 instead of 5/4.

Base116 exploits properties of UTF-8 to convert arbitrary binary data to valid, printable UTF-8, with a lower size overhead than is possible with any printable ASCII encoding.

For example, this binary data (in hex):

9329bd4b43da0bfdd1d97bdf081a2d42ec540155

is encoded as:

DZ<Oȥґ|yO(WFic{2n㎨r~9*Dz

Wrapping ‘DZ’ and ‘Dz’ characters are added by default to make encoded data easier to select, as the data may start or end with combining characters or characters from right-to-left scripts.

This crate provides both a binary and a library.

Usage

The base116 binary behaves like the base64 binary on Unix-like systems: base116 encodes, and base116 -d decodes. See base116 --help for more information.


lib.rs:

Base116 is like Base85, but it increases data size by only 7/6 instead of 5/4.

Base116 exploits properties of UTF-8 to convert arbitrary binary data to valid, printable UTF-8, with a lower size overhead than is possible with any printable ASCII encoding.

For example, this binary data (in hex):

9329bd4b43da0bfdd1d97bdf081a2d42ec540155

is encoded as:

DZ<Oȥґ|yO(WFic{2n㎨r~9*Dz

Wrapping ‘DZ’ and ‘Dz’ characters are added by default to make encoded data easier to select, as the data may start or end with combining characters or characters from right-to-left scripts.

This crate provides both a binary and a library.

No runtime deps

Features

  • alloc
  • cli-panic
  • doc_cfg
  • std