i'm trying parse binary file, , can't quite figure out how use bindata properly.
the way binary set such:
- first 4 bytes (uint32) represent length of property name.
- next 8 * length represent property name (as string).
- next 4 bytes (uint32) represent length of property type.
- next 8 * length represent property type (as string).
- next 8 bytes (uint64) represent length of data.
- after data number of bytes (depending on type of data is, int (4), string (4 * len), float (4), or array).
after process repeats next property.
i guess questions are:
when call mybindataclass.read() how feed correct portion read , not whole file, , since don't know how long each property (they vary type), how divide properly?
how make single bindata handle different property types?