Decoding REXPaint Files in Odin
tylerelton
23 points
2 comments
November 10, 2026
Related Discussions
Found 5 related stories in 40.4ms across 3,874 title embeddings via pgvector HNSW
- A NES emulator written in Odin frostbyte7 · 114 pts · November 15, 2026 · 46% similar
- Show HN: Deflate X-Ray, See inside a compressed file DonAtimator · 13 pts · November 20, 2026 · 41% similar
- MS Paint Remote Code Execution Vulnerability kuberwastaken · 426 pts · November 05, 2026 · 40% similar
- Decompiling Fast Food Tycoon 2: Drawing the World healeycodes · 209 pts · October 24, 2026 · 40% similar
- Show HN: Klad, a paint app your coding agent can drive (source-available) ambewas · 76 pts · November 11, 2026 · 37% similar
Discussion Highlights (2 comments)
MiroslavPokorny
Sounds like something kool to read. Thanks for sharing!
skrellm
Nice, but the description and the code disagrees on the file format. I believe this struct File :: struct { version: i32, layers: []Layer, } Should be File :: struct { version: i32, count: i32, layers: []Layer, } Also it's a bit dumb to store a CP437 character on i32 because that codepage has only 256 entries (meaning 3 zero bytes overhead for every cell). All in all I would rather store such character art in ANSI escape sequences (that's actually a sort of run-length-encoding), much smaller files, easier to decode. FYI, besides REXPaint, there were other binary ANSI art formats too, like BIN and XBIN ( https://deepwiki.com/andre-simon/ansifilter/7.4-bin-and-xbin... ), but those could not break the hegemony of ANSI escape sequences either.