Bitpacked Data

Nick Craig-Wood nick at craig-wood.com
Mon Mar 12 07:30:04 EDT 2007


none <""> wrote:
>  i need to interface python with a bitpacked data file,
>  the structure recorded in the file is the following:
> 
>  struct {
>  var_1 4bit
>  var_2 6bit
>  var_3 2bit
>  var_3 4bit
>  }
> 
>  how can read the struct and convert data into dictionary

You could try Construct

  http://construct.wikispaces.com/

This allows you to build a python class which will translate to and
from that datastructure.

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list