basE91 in Rails

I was checking out https://github.com/rails/rails/blob/master/activesupport/lib/active_support/xml_mini.rb#L152
It has: TODO: Add support for other encodings

So, I googled a bit and found this: http://base91.sourceforge.net/

On initial investigation, this seems a pretty good alternative to base64

I feel this might be of good value to a lot of developers.

If you guys feel the same way, I will be more than happy to get started on this.

Thank you.

Regards,

Sushruth

Is there any evidence that base91 is used “in the wild”? References to it are very light on Google etc; for instance, Wikipedia only mentions it as an “external link” on the Ascii85 page.

It’s also going to be tricky to embed in XML, since it uses several characters that XML reserves (<, &, > and ") which will require escaping. That appears to have been addressed in a variant (https://github.com/r-lyeh/base91) which uses a different set of characters.

—Matt Jones

Hello,

There is no evidence that it is being used a lot. But there is this, https://www.npmjs.com/package/base91 (< 100 downloads till now).

And this, a research paper, http://www.iiis.org/CDs2010/CD2010SCI/CCCT_2010/PapersPdf/TB100QM.pdf

Seems pretty interesting.

there is 7.7% (of
Base64’s encoded data) cut off in data traffic, transfer
time, transfer cost, at the same time there is saving our
society some energy, if employing Base91 instead of
Base64 as encoding for network data transfer with huge
data

We never know how much of a performance boost it provides or what downsides this has, unless we try it out ourselves.

Let me know what you guys think.

Warm regards,

Sushruth

I read and see the links, looks good to me, add support to base91 and you can choose, base64 is what everyone uses but I believe that is getting old.
It would be great to choose and the future remove once and for all the base64 , logical would have to test to see if you can not generate a problem.

Hi Sushruth,

Hello Federico,

Seems like a good first step.

But I just want to get a general idea, if this is something that the developers will use at all ?

Hello guys,

Following Federico’s advice, built a gem : https://github.com/sivsushruth/base91

Usage is dead simple, Base91.encode(“data”)

I would love to hear your opinions and suggestions on this.

Warm regards,

Sushruth