On Mon, Nov 24, 2008 at 11:49:04AM -0500, Darian Anthony Patrick wrote:
> Darian Anthony Patrick wrote:
> > Nicholas Clark wrote:
> >> I've written a module that implements the base 85 encoding used by the old
> >> btoa program, and by PDFs as their Ascii85 encoding*
> >>
> >> I'm not sure what to call it. It's functionally equivalent interface to
> >> MIME::Base64, but this isn't a MIME standard, so that's not the correct top
> >> level to live under. It is, arguably, an encoding module, but it isn't the
> >> interface of Encode, which is what modules under the Encode top level 
> >> provide.
> >>
> >> So I'm not sure what to call it.
> >>
> >> Nicholas Clark
> >>
> >> * http://en.wikipedia.org/wiki/Ascii85
> > 
> > Maybe Math::Base85, following the placement of Math::Base36?
> > 
> 
> Hmm.  Looks like there already is a Math::Base85.  Is your
> implementation different from the existing Math::Base85?

Yes. RFC 1924 specifies a way to convert an IPv6 address to ASCII, by
treating it as 128 bit integer, writing the number in base 85, then expressing
each base 85 digit as an ASCII character

btoa and PDFs break up a stream of bytes into ASCII by treating it as 32 bit
integers (4 bytes become 5 ASCII characters), and (in the case of PDFs) then
representing last odd 1 to 3 bytes as 2 to 4 ASCII characters. They also use
a different subset of printable ASCII from RFC 1924

Nicholas Clark

Reply via email to