Browse Prior Art Database

Generic Binary Description Language

IP.com Disclosure Number: IPCOM000010759D
Original Publication Date: 2003-Jan-16
Included in the Prior Art Database: 2003-Jan-16
Document File: 2 page(s) / 42K

Publishing Venue

IBM

Abstract

This article describes a technique for describing and encoding an arbitrary sequence of bytes in a human readable form.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

Generic Binary Description Language

When programming (or testing a program), it is often useful to be able to quickly create a file - or populate a memory area - with a specific sequence of bytes. For example, one may wish to create a file in a specific format or populate a C structure.

     The usual mechanism for doing this is by writing some code to generate an appropriate byte array and then manipulate data at a low level (e.g. by using memset, memcpy, etc).

     This article outlines a technique that allows structures to be simultaneously described and populated using human-readable data as input.

     Consider the requirement to populate a memory structure with the integer '534' represented as an unsigned 32 bit element followed by a null terminated string: "Hello, World!" followed by the bit pattern represented by 0x43b3dea2 followed by the bit pattern: 100100010011110011110001

     One could describe such a data structure in a number of ways (e.g. a C structure, XML schema, etc). However, to populate such a structure would require coding or perhaps the use of XSLT. There is no good way currently to simultaneously describe and populate such a structure.

     Consider the following XML: <GBDL>

<Integer endian='big' bits='32' signed='false'>

534

</Integer>

<String termination='null' >

Hello, World!

</String>

<Binary input='hex'>

43b3dea2

</Binary>

<Binary input='bitfield'>

100100010011110011110001

</Binary> </GBDL>

     When input to a suitable processing engine, this XML both describes...