Skip to content
A simple gem that provides methods for encoding/decoding Adobe’s binary-to-text encoding of the same name.
Branch: master
Clone or download
DataWraith Merge pull request #2 from nicolasleger/patch-1
Test on different Ruby 2 versions
Latest commit f5c6c36 Jan 31, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Correct the use of the Constant Lookup Operator (::) May 1, 2011
lib Bump version to 1.0.3 Jan 25, 2018
spec/lib Spec: Work around JRuby problems in the Encoding test case Sep 16, 2012
.gitignore .gitignore documentation directory doc/ May 5, 2011
.travis.yml Test on different Ruby 2 versions Jan 30, 2018
Ascii85.gemspec Gemspec: Remove `s.rubyforge_project` setting Jan 25, 2018
Gemfile Bundler scaffold May 5, 2011
LICENSE Include standalone file with the license text Sep 16, 2012 README: `Status` needs to be bold, not italic Jan 25, 2018
Rakefile Rakefile: Add 'tests' alias for 'test' task Sep 18, 2011

Status: This project is in maintenance mode. I will not develop new features, but I will address Issues and Pull Requests.


Build Status


Ascii85 is a simple gem that provides methods for encoding/decoding Adobe's binary-to-text encoding of the same name.

See page 131 and for more information about the format.


sudo gem install Ascii85


require 'rubygems'
require 'ascii85'

=> "<~;KZGo~>"

=> "Ruby"

In addition, Ascii85.encode can take a second parameter that specifies the length of the returned lines. The default is 80; use false for unlimited.

Ascii85.decode expects the input to be enclosed in <~ and ~> — it ignores everything outside of these. The output of Ascii85.decode will have the ASCII-8BIT encoding, so in Ruby 1.9 you may have to use String#force_encoding to correct the encoding.

Command-line utility

This gem includes ascii85, a command-line utility modeled after base64 from the GNU coreutils. It can be used to encode/decode Ascii85 directly from the command-line:

Usage: ascii85 [OPTIONS] [FILE]
Encodes or decodes FILE or STDIN using Ascii85 and writes to STDOUT.
    -w, --wrap COLUMN                Wrap lines at COLUMN. Default is 80, use 0 for no wrapping
    -d, --decode                     Decode the input
    -h, --help                       Display this help and exit
        --version                    Output version information


Ascii85 is distributed under the MIT License. See the accompanying LICENSE file for details.

You can’t perform that action at this time.