Comments on base52 encoder/decoder ?
bokr at oz.net
Tue Jan 7 14:38:40 CET 2003
On Mon, 06 Jan 2003 20:21:34 -0800, Erik Max Francis <max at alcyone.com> wrote:
>Bengt Richter wrote:
>> What it boils down to is that there are enough codes for two sets
>> of encodings plus 9023 special codes. You can think of it as a single
>> bit attribute for arbitrary subsequences of binary bytes with no extra
>> encoding characters vs doing them separately as before, and 9023
>> codes can be inserted also at a cost of 3 code characters apiece. You
>> can think of them as available escape codes.
>My initial, gut reaction to this is that you're getting too fancy for
>your own good.
Was it the extras, or just putting too much on the plate at once? ;-)
What if I had just started with the default encoding/decoding
and showed one useful example?
E.g., it makes a nice safe all-alpha hash string from md5
(that is also 25% shorter than hex):
>>> import base52x
>>> b2a = base52x.b2a_base52
>>> a2b = base52x.a2b_base52
>>> import md5
>>> md5.new("Nobody inspects the spammish repetition").digest()
>>> md5.new("Nobody inspects the spammish repetition").hexdigest()
>>> b2a(md5.new("Nobody inspects the spammish repetition").digest())
Verifying that the info is all there (for this case ;-):
More information about the Python-list