[issue17618] base85 encoding

Martin Morrison report at bugs.python.org
Sun Apr 14 02:24:54 CEST 2013


Martin Morrison added the comment:

Updated patch that includes both my original implementation of Ascii85, as well as the Mercurial implementation of base85. A few notes/questions:

- I named the Mercurial base85 implementation functions with the "b85" prefix. For the Ascii85 ones, I used "a85". I considered overloading the same functions with a keyword argument to select which encoding, but rejected that. Thoughts?

- I made only minor modifications to the Mercurial code to use bytes throughout (to match all the other APIs in the module). I also updated the docstrings a bit. My goal was to change as little as possible to guarantee identical behaviour.

- I haven't made the changes to add a pure Python binascii module as suggested in msg186216. Although poorly named, "base64.py" already contains a number of other encodings, so this seemed the best place for these too. I'm happy to make that change as well though if you really want it as part of this issue.

----------
Added file: http://bugs.python.org/file29838/issue17618-2.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17618>
_______________________________________


More information about the Python-bugs-list mailing list