'bdec', a set of tools for decoding binary files.
Writing decoders for binary formats is typically tedious and error prone. Binary formats are usually specified in text documents that developers have to read if they are to create decoders, a time consuming, frustrating, and costly process.
While there are high level markup languages such as ASN.1 for specifying formats, few specifications make use of these languages, and such markup languages cannot be retro-fitted to existing binary formats. 'bdec' is an attempt to specify arbitrary binary formats in a markup language, and create decoders automatically for that binary format given the high level specification.
Bdec can;
- Allow specifications to be easily written, updated, and maintained.
- Decode binary files directly from the specification.
- Generate portable, readable, and efficient C decoders.
- Run under Windows & Unix operating systems
The bdec xml specification uses constructs based loosely on those found in ASN.1.
If you're just getting started, the tutorial takes you step by step through the different concepts used in bdec. Once you've got started, refere to the rest of the documentation as required.
Any comments or questions can go to the group mailing list at bdec-project@yahoogroups.com. This is a moderated list, so please be patient if your question doesn't show up immediately.
The bdec library and all decoders generated by the specification compiler are available under the GNU Lesser General Public License (LGPL). In summary, this means;
- The decoders can be built and used in any application (including commercial closed source applications).
- If used in a closed source application, the decoder must be dynamically linked (eg: .dll in Windows, .so in Linux).
- The source code (and any modifications) to the decoder must be made available to anyone you distribute the decoder to.
The easiest way to install bdec is to use python's easy_install application. Run:
easy_install bdec
to install the latest version of the bdec decoder and compiler. The source code links below can be also be used if you install the dependencies manually (currently pyparsing and mako).
Version 0.6.2 (2010-02-02)
Bugfixes:
See the CHANGELOG for past releases.
Some projects that perform 'generic' binary decoding include;
Projects that generate decoders from high level specifications;