I've long looked for something like this for my day job, which involves implementing many different custom binary network protocols.
One new project in this space is poke:
It can describe arbitrary formats for both reading and writing, and it's usable programmatically, so I think it can solve the problem!