Tool · 2026 · Live
deflate x-ray
See inside a compressed file. Every repeated phrase turns out to be a pointer back to its first appearance, and each letter is colored by what it cost to store. Files you drop never leave your browser.

deflate x-ray
See inside a compressed file. Every repeated phrase turns out to be a pointer back to its first appearance, and each letter is colored by what it cost to store. Files you drop never leave your browser.
What it is
Almost every compressed file, from .zip and .png to .gz and most web pages, uses the same method, DEFLATE. When text repeats, it’s replaced with a short pointer back to where it appeared before: copy 41 bytes from 57 back. Letters that come up often get shorter codes than rare ones.
A normal decompressor hands you only the result. deflate x-ray takes the file apart with its own decompressor, written from scratch, and shows you every pointer and what each byte cost.
What you can see
- What each letter cost. Every byte is colored by its cost in bits. A letter stored as itself costs several bits. Inside a long copy it costs a fraction of one. The cheap repeats fade and the expensive surprises glow.
- Where each piece came from. Click any byte to see the pointer that wrote it, its raw bits, and an arc back to the text it copied.
- How deep the copying goes. In The House That Jack Built each verse copies the one before: copies of copies, 11 generations deep. A smooth PNG gradient goes 150 deep.
- Where the bits went. How many went to letters, pointers and headers, with the file’s checksum checked against what came out.
Your files stay with you
Type anything, and your browser compresses it with its own built-in DEFLATE, so you see what a real compressor chose. Or drop a .gz, .zlib, .png or .zip file on the page. The page reads it in your browser. There’s no upload and no server involved: the page makes no network requests at all.
How it works
The decompressor follows RFC 1951 and is built like zlib’s reference decoder, puff. It handles all three block types and finds the DEFLATE stream inside gzip, zlib, PNG and ZIP files. One test checks that the headers, pointers and end-of-block codes add up to exactly the number of bits in the stream, for every block type. The whole viewer is one 45 KB page.
Honest limits
- It paints the first 150,000 bytes of a stream. The statistics cover all of it.
- Only the first member of a multi-member gzip file is traced.
- ZIP64, encrypted ZIP entries and zlib preset dictionaries aren’t supported.
- Bytes outside printable ASCII, including accented letters, show as
·.
How it was made
This is one of my nightly builds: an AI agent invents, builds and tests a new project every night. deflate x-ray came out of the 15 October 2026 run.