atx-core — reader/decoder for Apple ATX (AAPL) texture-image containers.
ATX files are Apple "AAPL" texture containers found throughout iOS UI image caches: PosterBoard / runtime snapshots, wallpapers, contact posters, avatars / Animoji. Forensically they are what was on screen.
Container layout (clean-room from the iLEAPP reference)
The byte-level framing below is reimplemented clean-room from
abrignoni/iLEAPP's
leapp_functions/parsers/apple_atx.py (MIT, @JamesHabben, 2026-06-25), the
authoritative reverse-engineered reference cited by the source write-up
(James Habben, 2026-06-26).
AAPL\r\n\x1a\n 8-byte signature (PNG-style)
[size u32 LE][tag] chunk header (size = payload bytes, NOT incl. the 8-byte header)
payload[size]
... repeated to EOF
Chunk tags: HEAD (metadata), FILL, astc/ASTC (raw ASTC payload),
LZFS (LZFSE-compressed ASTC).
Decode pipeline
LZFSpayload: LZFSE-decompress (lzfse_rust) → a linear ASTC 4x4 stream (padded to the 4x4 block grid) →astc-decode→ RGBA8. No macro de-tiling — the compressed stream is already linear.- raw
astc/ASTCpayload: the ASTC blocks are macro-tiled in 32x32 block (128 px) tiles, Morton-ordered within each tile. De-tile to a linear block stream, thenastc-decode→ RGBA8. The Morton X/Y interpretation is not flagged by the format, so both orientations are decoded and the one with the smaller brightness jump across the 128-px macro-tile seams is kept (the reference's grid-seam heuristic).
Codecs are REUSED, never reinvented: lzfse_rust (the fleet's LZFSE) and
astc-decode. The new value-add is the AAPL container parse, the HEAD field
layout, and the Morton de-tiling.
Validation status (Doer-Checker) — tier-1
In-crate unit tests cover the container parse and Morton math against the
documented byte layout. Beyond that, the end-to-end decode is tier-1
validated on real device textures: 108 real .atx files from a public
iPhone 11 / iOS 17.3 full-file-system image decode to RGBA matching the
independent iLEAPP reference (a different author and a different ASTC
decoder) to within one LSB per channel on every file, across both the
LZFSE-compressed and raw macro-tiled paths. See docs/validation.md for the
corpus, oracle, and per-path results.
Epistemics: report the pixel format as confirmed vs inferred; never claim a file is the active wallpaper just because of its path. State what the container holds, not what it means.