Skip to content
revbingo edited this page Sep 21, 2010 · 18 revisions

Spiff is the Simple Parser for Interesting File Formats, where in this case "interesting" means "binary". You know, those awkward ragamuffins that use things like bytes (ewww) for representing their data. Traditionally, the way to read these files is to hand code a parser to read each bit of the file into corresponding objects. Spiff aims to make life easier by combining a simple definition of the file format with annotations to give a JAXB-like flavour to parsing files.

Getting Started

Spiff needs for you to have three things - a binary file to parse, a description of the file format, and some classes that will ultimately represent the contents of the file.

File formats are described in an .adf file (adf = Arbitrary Data Format). The formal grammar of the file is described in AdfGrammar. The .adf extension is a convention rather than a necessity.

Clone this wiki locally