[BangPypers] Handling bit sized fields in network headers

Noufal Ibrahim noufal at nibrahim.net.in
Fri May 4 12:08:02 CEST 2012


Balachandran Sivakumar <benignbala at gmail.com> writes:

> Hi,
>
>           What is the best way to handle bit sized fileds in network
> headers, if the data is binary ? The struct module doesn't support
> sizes in bits, and I have scenarios where there are fields of 2 bits,
> 3 bits and 5 bits in size. Thanks

I have not used this till now but it came up a while ago when I needed
something like this

https://en.wikipedia.org/wiki/Construct_(python_library)


-- 
~noufal
http://nibrahim.net.in

This page intentionally left blank.


More information about the BangPypers mailing list