Questions tagged [base91]

Base91 (stylized as basE91) is a type of encoding scheme that represent binary data in an ASCII string format

As the name implies, basE91 uses radix-91 to encode data using the below table (the first column is the digit value, the next two column is the character and its ASCII value)

0   A   0x41    13  N   0x4E    26  a   0x61    39  n   0x6E    52  0   0x30    65  %   0x25    78  >   0x3E
1   B   0x42    14  O   0x4F    27  b   0x62    40  o   0x6F    53  1   0x31    66  &   0x26    79  ?   0x3F
2   C   0x43    15  P   0x50    28  c   0x63    41  p   0x70    54  2   0x32    67  (   0x28    80  @   0x40
3   D   0x44    16  Q   0x51    29  d   0x64    42  q   0x71    55  3   0x33    68  )   0x29    81  [   0x5B
4   E   0x45    17  R   0x52    30  e   0x65    43  r   0x72    56  4   0x34    69  *   0x2A    82  ]   0x5D
5   F   0x46    18  S   0x53    31  f   0x66    44  s   0x73    57  5   0x35    70  +   0x2B    83  ^   0x5E
6   G   0x47    19  T   0x54    32  g   0x67    45  t   0x74    58  6   0x36    71  ,   0x2C    84  _   0x5F
7   H   0x48    20  U   0x55    33  h   0x68    46  u   0x75    59  7   0x37    72  .   0x2E    85  `   0x60
8   I   0x49    21  V   0x56    34  i   0x69    47  v   0x76    60  8   0x38    73  /   0x2F    86  {   0x7B
9   J   0x4A    22  W   0x57    35  j   0x6A    48  w   0x77    61  9   0x39    74  :   0x3A    87  |   0x7C
10  K   0x4B    23  X   0x58    36  k   0x6B    49  x   0x78    62  !   0x21    75  ;   0x3B    88  }   0x7D
11  L   0x4C    24  Y   0x59    37  l   0x6C    50  y   0x79    63  #   0x23    76  <   0x3C    89  ~   0x7E
12  M   0x4D    25  Z   0x5A    38  m   0x6D    51  z   0x7A    64  $   0x24    77  =   0x3D    90  "   0x22

The data stream is split into 13-bit chunks, which are then converted into two characters. The maximum value of the chunk is 213 - 1 = 8191 so it can be stored in a two-digit radix-91 value whose maximum is 912 = 8281

More information:

7 questions
11
votes
1 answer

Base91, how is it calculated?

I've been looking online to find out how basE91 is calculated. I have found resources such as this one which specifies the characters used for a specific value but nowhere have I found how I get that value. I have tried changing the input values…
milo.farrell
  • 662
  • 6
  • 19
7
votes
2 answers

Why is “-” (hyphen) the unique ASCII limitation for E-mail compatibility?

I was reading this proposal for Base91, (with bold formatting added by me): All the SMTP-based E-mail can provide compatibility with the E-mail. So-called compatibility with the E-mail is to transform arbitrary 8-bit data byte-strings or arbitrary…
Cœur
  • 37,241
  • 25
  • 195
  • 267
4
votes
4 answers

NodeJS, basE91, & little endian

How would I got about decoding the string below from basE91 to readable text using…
Pastor Bones
  • 7,183
  • 3
  • 36
  • 56
1
vote
2 answers

Convert Binary/Hex to Base91 / Ascii85 / Base64

I need an JS encoder to base91 or Ascii85 for a binary number. I do have a google sheet, which looks likes as follows: Code is: function columnToLetter(column) { //https://stackoverflow.com/a/21231012/14226613 var temp, letter = ''; while…
TefoD
  • 177
  • 10
0
votes
0 answers

Serving images across mobile and web

I need to build a web portal that uploads images to a database. These images will be displayed in an android app, and the web portal. The common method I use when dealing strictly with apps is as follows: compress the picture encode it to a base91…
BiGGZ
  • 503
  • 4
  • 17
0
votes
0 answers

Converting to and from base91

I know that base91, as defined by Joachim Henke, uses these characters: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~" What steps should one perform in order to convert strings to and from base91?
Shalva123
  • 54
  • 6
0
votes
0 answers

Base91 string corruption in mysql database

I'm using Base91 to store an image as a String in a mysql database. When I retrieve the string to convert it back to an image, the string seems to have been corrupted by the database. I'm sure it's being corrupted in the database because I did an…
BiGGZ
  • 503
  • 4
  • 17