Projects / Construct

Construct

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 (lazy) parsing, and many more. The library defines a large number of primitive constructs, as well a large inventory of file formats and network protocols.

Tags
Licenses
Operating Systems
Implementation

Recent releases

  •  12 Jan 2007 18:39

    Release Notes: Construct2 is a rewrite of the library, making it faster and much slimmer. The library is now byte-oriented instead of bit-oriented, so it uses eight times less memory. It can parse files directly from the disk. Meta constructs now use lambda instead of eval. Textual processing (context free grammar) was added. On-demand parsing was added. Thorough unit tests were added. A full online tutorial is available.

    •  23 Dec 2006 16:46

      Release Notes: Construct2 is a rewrite of the library, making it faster and much slimmer. The library is now byte-oriented instead of bit-oriented, so it uses eight times less memory. It can parse files directly from the disk. Meta constructs now use lambda instead of eval. Textual processing to some extent (context free grammar) was added. On-demand parsing was added. Thorough unit tests were added. A full tutorial was written.

      •  19 Apr 2006 06:44

        Release Notes: Bugs in AttrDict, ExceptionContainer, and demo1.py were fixed. PaddedString, DNS inventory, and a toy network sniffer were added. BytePadding, BytePointer, and IpStack were changed and the demos package was removed.

        •  08 Apr 2006 08:10

          Release Notes: Formatted, Float32/64 (both parsing and building), and FlagsAdapter were added. LV, PascalString, and Flag were improved. The utils package and PascalStringAdapter were removed.

          •  01 Apr 2006 18:53

            Release Notes: New features include Embed, Pass, If, IfThenElse, LazyBind, Float, and get_size(). RepeaterError and NoDefaultCaseError were defined. LV was improved. TLV was removed. LazyBind now allows recursive definitions. Float only supports parsing and not building, since it's too complicated.

            Screenshot

            Project Spotlight

            OpenStack4j

            A Fluent OpenStack client API for Java.

            Screenshot

            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.