Encode and decode basE91 — a compact binary-to-text encoding denser than Base64, packing ~13 bits per 2 output characters.
basE91 was designed by Joachim Henke as a more efficient alternative to Base64 — it encodes binary data using 91 printable ASCII characters and yields roughly 23% overhead compared to Base64's 33%. The algorithm reads up to 13 bits from the input, then emits a variable-length (1 or 2) base-91 pair. The basic alphabet includes ", which is awkward inside JSON strings; the extended variant substitutes a different printable character so the output can be embedded unquoted.