base91_encode: basE91 Encoding

View source: R/ascii_encoding.R

base91_encodeR Documentation

basE91 Encoding


Encodes binary data (a raw vector) as ASCII text using basE91 encoding format.


base91_encode(rawdata, quote_character = "\"")



A raw vector.


The character to use in the encoding, replacing the double quote character. Must be either a single quote ("'"), a double quote ("\"") or a dash ("-").


basE91 (capital E for stylization) is a binary to ASCII encoding format created by Joachim Henke in 2005. The overhead (extra bytes used relative to binary) is 22.97% on average. In comparison, base 64 encoding has an overhead of 33.33%. The original encoding uses a dictionary of 91 out of 94 printable ASCII characters excluding - (dash), \ (backslash) and ' (single quote). The original encoding does include double quote characters, which are less than ideal for strings in R. Therefore, you can use the quote_character parameter to substitute dash or single quote.


A string representation of the raw vector.


qs documentation built on March 7, 2023, 7:55 p.m.