Back to Daily Feed 
Generate an ASCII World Map in 500 Bytes with JavaScript
Worth Reading
Originally published on Simon Willison's Weblog by Simon Willison
View Original Article
Share this article:

Summary & Key Takeaways
- Iwo Kadziela created an ASCII world map using only 445 bytes of data.
- The technique relies on deflate compression for data efficiency.
- A concise JavaScript snippet decompresses and renders the map in the browser.
- It demonstrates using
fetch()withdata:URIs for loading compressed data. - The
DecompressionStreamAPI is central to the decompression process.
Our Commentary
This is just pure web magic. I love seeing these kinds of highly optimized, almost "code golf" solutions that push the boundaries of what's possible with minimal resources. The fetch('data:;base64,...') trick combined with DecompressionStream is something I genuinely didn't know was possible. It's a fantastic reminder that there's always more to learn about browser capabilities.
View Original Article
Share this article: