ATRIUMsearch → argument graph
Article · 2026-07-04 · 2 moments

Building a World Map with only 500 bytes

Building a World Map with only 500 bytes Iwo Kadziela (assisted by Codex) figured out a way to generate a credible ASCII world map using 445 bytes of data: The key trick is to use deflate compression, which is then wired together using this neat snippet of JavaScript. I didn't know you could use fetch() with data: URIs like this: fetch('data:;base64,1ZpLsgIxCEXnrM...==').then( r => r.body.pipeThrough(new DecompressionStream('deflate-raw')) ).then( s => new Response(s).text() ).then( t = ✦ AI generated

01
Mechanism

fetch() can be called directly on a data: URI, with the response body piped through a DecompressionStream to decode deflate-raw compressed data in the browser.

The code snippet reveals that fetch() works on data: URIs, and its response body can be piped through DecompressionStream('deflate-raw') to decompress the embedded base64 map data into HTML on the fly.

transcript

Simon Willison: I didn't know you could use fetch() with data: URIs like this: fetch('data:;base64,1ZpLsgIxCEXnrM...==').then( r => r.body.pipeThrough(new DecompressionStream('deflate-raw')) ).then( s => new Response(s).text() ).then( t => b.innerHTML = '<pre style=font-size:.65vw>' + t )

02
Fact

Iwo Kadziela, assisted by Codex, generated a credible ASCII world map using just 445 bytes of data by relying on deflate compression.

Iwo Kadziela, with help from Codex, built a recognizable ASCII-art world map compressed down to just 445 bytes by leaning on deflate compression instead of storing raw map data.

transcript

Simon Willison: Iwo Kadziela (assisted by Codex) figured out a way to generate a credible ASCII world map using 445 bytes of data: The key trick is to use deflate compression, which is then wired together using this neat snippet of JavaScript.

explains mechanism · 1

Highlight slides