I posted a note on parsing
binary files using Python over on my
Rusty Bioinformatics blog. The example uses BAM index files, which are well described but do not have a software library that specifically targets reading and writing these types of files. Enjoy!