If you think that the documentation for Java.class files is a good example of a specification, take a look at Preon. Preon captures it completely and generates documentation like this .
In fact, there are a couple of other initiatives to capture the "syntax" of binary encoded files. ASN.1 is useful, but it does not give you much mileage if you intend to capture - say - Java class files. The same goes for BSDL, Flavor, BFlavor, and a few other other initiatives. The problem is that there are a million ways to encode binary data, many binary compression methods, and I think that means that there will never be something that completely captures it if the language itself does not expand.
Google protocol buffers basically have the same problem. It defines something like a Corba CDR, and thatβs good if you donβt need something more advanced. Google protocol buffers will not allow you to grab the Java class file format.
source share