How to use a 5 or 6 bit integer in Python?

Ragnar Hafstað gnari at
Sun Dec 21 15:43:41 CET 2003

"Hartmut Goebel" <h.goebel at> wrote in message
news:3FE43F09.10307 at
> Hi,
> - pack the key-tuples into a string using pack; you may even pack 4
>    intergers into one byte since the values range from 1-64 (which is
>    equivalent to 0-63).

sorry, but actually 0-63 is 6 bits (as in the Subject line)
6bits*4=24bits more like 3 bytes


More information about the Python-list mailing list