Is there a way to define template with optional structure for hex editor?

41 views Asked by At

In my work, I often need to look at messages in binary format from various devices. So I decided to look for a program that can show raw binary data and parsed data representation of it. Also, it would be helpful if I could compare these files.

Hex editor looked like a solution at first glance, but when I went into templates, it turned out that all templates have a fixed data structure, where my data can have any structure, but it follows certain rules:

  • First byte represents the type of data (string, array, struct, int, etc.);
  • if data is some sort of collection, then the second byte is length or items count;
  • then data itself goes.

A message can consist of any data, be it an integer, array, string, etc. And if the data is collection, it can have items of any type.

So my question is: Can I achieve this with hex editor, or should I write my own parser/comparer?

0

There are 0 answers