Binary data parsing

Can Irony be used for parsing a stream of binary data?
For instance I'm getting binary data as:
<HeaderId><message or collection of messages with terminator><terminator>

Depending on HeaderId the message that follows it is in different format.

Based on the data in the stream, I'd like to construct CLR objects and set their properties accordingly. So far I've been doing the manual parsing with a huge nested switch/case statements, which is hard to maintain. I'm wondering if Irony could make it easier.

theoretically, you can try, but I doubt it's worth the trouble. LALR parser are general facilities to parse regular, hierarchical 'inputs', whatever format it is - so binary parsing is possible. But Irony is heavily geared toward text input.
To try, you can either create a set of terminals that can read binary data (and modify parser/scanner pipeline to accept binary input), or maybe convert binary stream to some kind of text first, and then try to parse it using Irony

As a non-Irony side note: I had a requirement to parse a binary stream and 'transform' it to objects on the fly (via ILGenerator) and went with an OMeta(PEG) approach as it was a clean way, for me a least, to not build those "huge nested switch/case
statements" which another DevOps person had started doing. Maintenance/testing was killing that approach.

The PNG parsing example was done in OMeta/JS but it is not 100% complete cut/paste example (I have a working OMeta/JS for it somewhere), but I used the concept in C#, there are several OMeta OSS projects that use C# as the 'host language'. The extended PEG
format of OMeta just clicks and works in my head for some reason and my end result with as clean as the PNG grammar in that post. Simple to maintain and extend (IMHO).