Efficient Bit addressing in Python.

Hendrik van Rooyen mail at microcorp.co.za
Sat Oct 11 23:41:31 EDT 2008


Ross Ridge  wrote:

>This is the code I use to convert large bit arrays to byte strings and
>back:
>
>import string
>import binascii
>import array

8<--------------- examples ----------------------

>I don't think you can do anything faster with standard modules, although
>it might not be efficient if you're only working with a single byte.

Thanks I was not aware of binascii module this looks powerful.

- Hendrik






More information about the Python-list mailing list