3 ms·
If there is any foreseeable need that the format will benefit from being executable, I would make the magic bytes looks like this: #!/usr/bin/whatever^@^@^@^
by kazinator 2y ago
If there is any foreseeable need that the format will benefit from being executable, I would make the magic bytes looks like this:
#!/usr/bin/whatever^@^@^@^@^@[HDR]
A hash bang path terminated by a null, followed by some (aligned) binary material with version information and whatnot, all fitting into around 32 bytes.
The header format could allow for variability in the path; the #! and [HDR] part could be enough to give it identify it.