Construct is a Python library for declaratively defined data structures, called "constructs". These constructs can both parse data into an object and build an object into data. Constructs handle fields of either byte or bit granularity, structs, unions, sequences, repeaters, adapters, validators, switching, pointers, on-demand parsing, and many more.
Construct is a python module for bit-level, symmetrical parsing and building of data structures. Complex constructs are formed by a hierarchy of less-complex constructs, as well as user-defined constructs.