You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Writer's R2004-family file header omits the §4.1 fixed fields real files carry #233
Found October 26, 2026 while measuring the §4.1 header for the streaming R2004-family header grammar (#205).
file_writer::assemble_dwg_bytes writes a CRC-valid encrypted 0x6C block but none of §4.1's fixed fields. Measured on every R2004-family file available (nextgis/dwg_samples@ff05d5aline/arc/circle 2004, 2010 and 2013, plus the local R2018 sample_AC1032.dwg) against the four canonical fixtures:
Field (§4.1)
Every real file
Canonical fixtures
plain 0x28 (long)
0x80
0
decrypted 0x10
0x6C
0
decrypted 0x14
4
0
decrypted 0x24 ("ODA writes 1")
1
0
decrypted 0x44 / 0x48 / 0x4C
0x20 / 0x80 / 0x40
0
0xEC..0x100: "copied from the magic number sequence, starting at 0x100 – 0x14"
yes
zeros
decrypted CRC-32
valid
valid
The legacy reader checks only the file-ID string, so nothing fails today; a strict streaming header that treats these documented constants as layout guards would reject the fixtures, as the strict §3.2 reader did for #214.
Not in scope here: the second header copy at the end of the file (the fixtures write address 0), the plain bytes 0x15–0x17 and 0x2C–0x7F (real files carry non-zero values the spec does not explain), and the LZ77 stream framing recorded on #163.
Acceptance:
The writer emits the fields above; the canonical fixtures are regenerated deterministically.
Only header bytes change; decoded entities and offsets are unchanged on the canonical corpus.
Activity
fix(writer): emit the §4.1 header fields real R2004-family files carry
fix(writer): emit the §4.1 header fields real R2004-family files carry
fix(writer): emit the §4.1 header fields real R2004-family files carry