From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Microsoft COMPRESS (SZDD and KWAJ)" |
|---|
| claim | "KWAJ: magic 4B 57 41 4A 88 F0 27 D1, u16 method (0 none, 1 XOR, 2 LZSS, 3 LZ+Huffman, 4 MSZIP), u16 data offset, u16 flags selecting optional fields (0x01 u32 size, 0x02 u16, 0x04 length-prefixed data, 0x08 name, 0x10 extension, 0x20 comment)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Microsoft COMPRESS (SZDD and KWAJ)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "kwaj_header" |
|---|
| size_min | 14 |
|---|
| fields | | offset | "0x00" |
|---|
| size | 8 |
|---|
| type | "uint8_t[8]" |
|---|
| name | "magic" |
|---|
|
| offset | "0x08" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "method" |
|---|
|
| offset | "0x0A" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "data_offset" |
|---|
|
| offset | "0x0C" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "flags" |
|---|
|
|
|---|
| endianness | "little" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "CMPR_* constants and do_header_KWAJ." |
|---|
| repo | "jsummers/deark" |
|---|
| commit | "8997059c4f32af79978fb6c83be7c1c26c259afa" |
|---|
| path | "modules/mscompress.c" |
|---|
| lines | "14-26, 149-215" |
|---|
|
|
|---|
| confidence | "medium" |
|---|
| related | |
|---|
| key | "KWAJ header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T01:42:06.756Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T06:25:40.053Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read modules/mscompress.c at 8997059c4f32: detect_fmt_internal magic 4B 57 41 4A 88 F0 27 D1; do_header_KWAJ reads method u16le (CMPR_NONE..CMPR_MSZIP = 0..4), data offset u16le, flags u16le; 0x01 u32 size, 0x02 skip 2 bytes, 0x04 u16 length + that many bytes, 0x08 NUL-terminated name (max 9 incl NUL), 0x10 NUL-terminated extension (max 4), 0x20 not parsed." |
|---|
| notes | "Caveat: the 'comment' meaning of flag 0x20 is not in deark (it has only a TODO with a question mark), so that label is a guess; confidence left at medium." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:49:18.873Z" |
|---|
| summary | "Byte order set: do_header_KWAJ reads method, data offset and flags with dbuf_getu16le_p (already cited 149-215)" |
|---|
| changed | |
|---|
|
|
|---|