07 What is the Base91 Encoding?


Base91 is an advanced method for encoding binary data as ASCII characters. It is similar to UUencode or base64, but more efficient.

The overhead generated by Base91 depends on the input data. It is at most 23% (compared to 33% for base64) and can be as low as 14%, which typically occurs with 0-byte blocks. This makes Base91 very useful for transferring larger files over binary insecure connections such as email or terminal lines.

As the name implies, Base91 requires 91 characters to represent the encoded binary data in ASCII.

Of the 94 printable ASCII characters (0x21-0x7E), the following three characters were omitted to build the alphabet:

  • Hyphen, 0x2D
  • \ ‘ backslash, 0x5C
  • ‘ apostrophe, 0x27