Summary
Expand the type system from 4 basic types to full coverage of GNU file's magic format type specifiers.
Current State
Only 4 of 33+ types implemented: byte, short, long, string
Tracking
v0.2.0 - Core Types
v0.3.0 - Advanced Types
Parser: implement regex and search types #39 - Regex and search types HIGH
Parser: implement default, clear, name, use, and indirect meta-types #42 - Meta-types: default, clear, name, use, indirect HIGH
lestring16/bestring16: UCS-2 string types #232 - lestring16/bestring16 (UCS-2 string types) HIGH (blocker for loading /usr/share/file/magic/filesystems)
Implement string-type flag semantics (/c /C /w /W /B /b /t /T) #234 - String-type flag semantics (/c /C /w /W /B /b /t /T) — parser landed in fix: load and correctly evaluate /usr/share/file/magic/filesystems and adjacent magic files #233 ; semantics deferred
Implement search-type flag semantics (/s start-anchor, /b binary, etc.) #235 - Search-type flag semantics (/s start-anchor, /b binary, etc.) — parser landed in fix: load and correctly evaluate /usr/share/file/magic/filesystems and adjacent magic files #233 ; semantics deferred
Implement ID3 variable-byte decoding for indirect pointer specifiers (i / I) #237 - ID3 synchsafe decoding for i / I indirect pointer specifiers — placeholder Long mapping landed in fix: load and correctly evaluate /usr/share/file/magic/filesystems and adjacent magic files #233
Success Criteria
All types needed to parse system magic databases (/usr/share/file/magic/) are supported.
Priority Order
Quad (needed for modern binary formats)
Regex/search (needed for text detection - JSON, scripts, XML)
Meta-types (needed for rule composition and indirect format detection)
Date types (archives, filesystem images)
Float/double (scientific data, image metadata)
Pstring (rare, but needed for full compat)
UCS-2 strings (lestring16/bestring16, NTFS/FAT/Windows formats)
String/search flag semantics (case-insensitive, whitespace, /s anchor) — common in shebang and scan rules
ID3 synchsafe (i/I) — needed for accurate MP3 inner-stream detection
Summary
Expand the type system from 4 basic types to full coverage of GNU file's magic format type specifiers.
Current State
Only 4 of 33+ types implemented:
byte,short,long,stringTracking
v0.2.0 - Core Types
v0.3.0 - Advanced Types
i/Iindirect pointer specifiers — placeholderLongmapping landed in fix: load and correctly evaluate /usr/share/file/magic/filesystems and adjacent magic files #233Success Criteria
All types needed to parse system magic databases (
/usr/share/file/magic/) are supported.Priority Order