Bird

With Bird we can declaratively specify how to parse binary data. This is how the PNG format is defined in Bird:

As we can see, some of Bird's most distinctive features are:

  Data Structure = Parser
  Primitive datatypes for tokens
  Annotations to provide context (e.g.: encoding, endianness)

The Bird project is open source and available at SWAT-engineering/bird.

For more information, see the Bird Language manual