= Structured Binary Data = [[PageOutline(2-3)]] This page will document my thoughts and design ideas for the structured binary data project. The project aims to address #317; a description of my overall approach can be found on the [https://www.google-melange.com/gsoc/project/google/gsoc2012/wtachi/46005 GSoC project page]. == Existing Tools == I am researching existing tools related to my project, so they can be used for inspiration. === [http://construct.wikispaces.com/ Construct] === TODO: looks promising. Also look at issues and forks. === [http://bindata.rubyforge.org/ BinData] === TODO: looks promising. === [http://wsgd.free.fr/ Wireshark Generic Dissector] === The length and real value of a field can depend on all previous fields and use complex expressions. Structures can contain `if`/`while`/`continue`/`break`/… statements. === Less interesting tools === [https://www.wireshark.org/ Wireshark] and [http://www.tcpdump.org/ tcpdump]:: As the Construct wiki notes, you would expect these developers to have some sort of DSL, but they just use C for everything. Wireshark does use ASN.1, Diameter, and MIDL for protocols developed with them. [http://kde.org/applications/utilities/okteta/ Okteta]:: Has an XML format for simple structures, where the length of a field can depend on a previous value. Also has an on‐line database of structures, but it isn’t very popular—there are only nine submissions! Other simple formats:: [http://ff-extractor.sourceforge.net/ ffe] can only handle trivial structures. [http://docs.python.org/library/struct.html Python’s struct] and [https://github.com/ToxicFrog/vstruct VStruct] use concise string formats to describe simple structures. Other hex editors:: [http://beye.sourceforge.net/ Beye], [http://home.gna.org/bless/ Bless], and [https://live.gnome.org/Ghex GHex] lack interesting features. Protocol definition formats:: [https://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One ASN.1], [https://en.wikipedia.org/wiki/Microsoft_Interface_Definition_Language MIDL], and other IPC implementations go in the other direction: they generate a binary format from a text description of a structure. ASN.1 in particular has many features.