Skip to content

Templates: overlay (sub)fields and datadriven selection of highlighting #20

@Astrinus

Description

@Astrinus

I'm trying to work with Matlab binary files, whose format is described in this PDF: https://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf
The format can be little endian or big endian, depending if bytes 126-127 (0-based) are 0x494D or 0x4D49, and this changes bytes position.
I'm stuck with the following problems:

  • each "element" is preceded by a tag, decomposable into two fields of 4 or 2 bytes each depending on the two MSBs of the first 4 bytes read as an uint32 (tag is 2x4 bytes if these are zero or 2x2 bytes if these are not); note that MSBs position depends on file endinanness. I'm not capable of coding this into templates
  • the very same problem exists with "array flags": the LSB defines how to interpret the following data and the second LSB some flags: how can tell HexEdit "read this field as uint32, then subfield # 1 is !!(this & 0x0800), subfield # 2 is (this & 0xFF), etc."?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions