Simple formal definition of binary data

Viewed 87

I would like to formally describe binary data but in the simplest possible way. Something like python's struct format string.

Are there any good definitions which I could use or at least take some inspiration from it?

Now I am sending binary data which are defined by C structure to server where it is parsed with python using struct module. Problem is that, I always need to change python parser if binary data changes. So I thought that I can attach some format definition of sent data. I know I can directly use python representation but maybe there is something even smaller then this.

0 Answers
Related