I made a gem for basE91 encoding and decoding.
basE91 is an advanced method for encoding binary data as ASCII
characters. It is similar to UUencode or base64, but is more efficient.
The overhead produced by basE91 depends on the input data. It amounts at
most to 23% (versus 33% for base64) and can range down to 14%, which
typically occurs on 0-byte blocks. This makes basE91 very useful for
transferring larger files over binary unsafe connections like e-mail or
terminal lines.