tutorial
Building a World Map with only 500 bytes
This approach offers a lightweight way to embed rich static data (like maps or small AI models) in web pages, reducing bandwidth and initialization time—a practical pattern for AI builders deploying client-side inference or visualizations.

What happened
Simon Willison highlights a clever technique by Iwo Kadziela (with assistance from Codex) that generates a credible ASCII world map from just 445 bytes of compressed data. The core insight is using deflate compression to shrink the map data, then decompressing it in the browser via the `DecompressionStream` API. A particularly neat aspect is the use of `fetch()` with a data: URI—a pattern that may be unfamiliar to many developers—to feed the compressed base64 payload directly into the decompression pipeline without an external server request. The result is rendered in a `<pre>` tag with a tiny font size. For developers building AI workflows, this demo illustrates how browser-native compression APIs can dramatically reduce payload sizes for static data, which is useful for shipping small models or lookup tables. It also showcases a clean, modern JavaScript pattern for inline data processing that avoids third-party libraries. The combination of Codex assistance hints at how AI can help prototype such low-level optimizations.
Key takeaways
- An ASCII world map is generated from 445 bytes of deflate-compressed data, decompressed in the browser.
- The technique uses `fetch()` with a data: URI to load the compressed payload, then `DecompressionStream('deflate-raw')` to decompress.
- Codex (OpenAI's code generation model) assisted in creating the solution.
- The map is rendered in a `<pre>` element with a font size of 0.65vw for compact display.
- The demo was shared via Hacker News and demonstrates efficient data compression for web applications.
Why it matters
This approach offers a lightweight way to embed rich static data (like maps or small AI models) in web pages, reducing bandwidth and initialization time—a practical pattern for AI builders deploying client-side inference or visualizations.
This is an original editorial digest by AI Workflow Center. Full reporting at the source:
Read the original on Simon WillisonMore AI news
All news →
Join the AI Workflow Pro Community