← ClaudeAtlas

reverse-engineering-formatslisted

Use when decoding or rebuilding an undocumented or partly documented file format, codec, compression scheme, or obfuscated field; when reimplementing a closed app's output with no reference implementation to diff against; or when tests for a decoder or renderer need ground truth.
whoiscarlo/agent-skills · ★ 1 · Code & Development · score 64
Install: claude install-skill whoiscarlo/agent-skills
# Reverse Engineering Formats ## Overview You cannot trust a decoder you cannot check. Before guessing at a format, find an **answer key**: output the original software already produced, which your code must reproduce. Then pin every finding as a test with a written margin. Taken from the ArtCraft apps (Rust rebuilds of Photoshop, Lightroom, Premiere, After Effects, Acrobat, Illustrator). Notes: `~/code/APPS/vault/ArtCraft/`. ## Answer keys, strongest first | Answer key | Example | How to use it | |---|---|---| | Render saved inside the file | PSD merged composite; camera JPEG inside a raw | Render the layers, compare to it | | Same content saved two ways | Same scene shot compressed and uncompressed | The plain copy is the truth for the packed one | | Outside program run as a black box | ffmpeg, qpdf, DNGLab, rawpy | Run the binary, diff outputs. Never read its source, never link it | | Original app driven by its own script API | After Effects `.jsx` sampling keyframes | Record numbers, fit formulas, commit the numbers as tests. Check the vendor's terms first | | Weak key | Embedded thumbnail, stale preview | Fallback only. Calibrate its margin on files that pass a strong key. A fail here may be the key's fault | ## Techniques when the spec runs out - **Search, then score with self-consistency.** For hidden tables (Nikon NEF Huffman), search candidate tables and keep the one where the whole stream decodes, ends within the last byte, and every value stays in range.