Bit substring search

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Tue Jun 24 07:52:41 EDT 2008


Kris Kennaway:
> I am trying to parse a bit-stream file format (bzip2) that does not have
> byte-aligned record boundaries, so I need to do efficient matching of
> bit substrings at arbitrary bit offsets.
> Is there a package that can do this?

You may take a look at Hachoir or some other modules:
http://hachoir.org/wiki/hachoir-core
http://pypi.python.org/pypi/construct/2.00
http://pypi.python.org/pypi/FmtRW/20040603
Etc. More:
http://pypi.python.org/pypi?%3Aaction=search&term=binary

Bye,
bearophile



More information about the Python-list mailing list