base-96

Kless jonas.esp at googlemail.com
Sun Aug 3 04:07:19 EDT 2008


On 3 ago, 00:16, Tim Roberts <t... at probo.com> wrote:
> Kless <jonas.... at googlemail.com> wrote:
>
> >I think that would be very interesting thay Python would have a module
> >for working on base 96 too. [1]
>
> Well, then, write one.
>
> However, I'm not sure I see the point.  Base 64 is convenient because 6
> bits becomes 8 bits exactly, so 3 bytes translates exactly to 4 characters.
> With base 96, you would end up doing division instead of just shifting and
> masking; the conversion isn't as "neat".
>
> >As you can see here [2], the printable ASCII characters are 94
> >(decimal code range of 33-126). So only left to add another 2
> >characters more; the space (code 32), and one not-printable char
> >(which doesn't create any problem) by last.
>
> This leaves some tricky issues.  How will you denote the end of a base 96
> sequence?  If every printable character can be part of the ciphertext, what
> can you use as an end marker or a padding character?
Well, it could be used an Unicode (UTF-8) character -wich isn't in
ASCII set-, if it isn't possible use a non-printable char.



More information about the Python-list mailing list