Files
ImHex-Patterns/patterns/ar.hexpat
WerWolv 4eff8460ba includes: Added pattern language standard library (#19)
* libstd: Initial standard library work

bit operations, fixed point, numeric limits and math functions

* libstd: Added ctype, rustint, stdint and string library, expand bit, fxpt and math library

* patterns: Drastically improve ELF pattern

* patterns: Added atmosphere AFE2

* patterns: tabs -> spaces

* patterns: Added archive file pattern
2021-09-30 12:55:42 +02:00

21 lines
480 B
Plaintext

#pragma MIME application/x-archive
struct ARFile {
char file_name[16];
char modification_timestamp[12];
char owner_id[6];
char group_id[6];
char file_mode[8];
char file_size[10];
u16 end_marker;
if (end_marker == 0x0A60) {
u8 data[std::string::parse_int(this.file_size, 10)];
padding[sizeof(data) & 1];
}
} [[static]];
char signature[8] @ 0x00;
std::assert(signature == "!<arch>\n", "File is not a valid archive!");
ARFile files[while($ < std::mem::size())] @ $;