Arpie is a toolkit for handling binary data, network protocols, file formats, and similar.
a DSL-like syntax for describing file formats (see BINARY)
stackable protocols that can be used to abstract layers of on-wire data (see PROTOCOLS)
some bits and glue to put it all together (for example, with eventmachine)
arpie is packaged up as a gem - just do gem install arpie to get the newest version.
The latest source is available through git.