1,000 simulated document revisions generate 20.4 MB of raw revision text. Compressed into a Zstandard-compressed JSON array, that drops to 80.3 KB. Simon Willison built Python prototypes to test a simple idea: store every prior version of a document as a JSON array of strings, then compress the whole blob with zlib or zstd. The redundancy across revisions makes compression brutally effective.
The implementation uses two SQLite columns: a binary blob holding the compressed JSON array of revision strings, and a plain integer array of Unix timestamps that needs no compression at all. GPT-5.6 Sol Pro generated the prototype code after a 38-minute run, following a voice-mode brainstorm with the ChatGPT iPhone app. The full transcript, code, and output files are publicly available on GitHub.
The practical problem this solves is read-heavy: decompressing and recompressing the entire array on every edit is expensive. Sol's solution is to chunk history into multiple rows, each capped at 128 revisions or 3 MB of uncompressed JSON. The chunking strategy, the compression benchmarks across different document sizes, and the full prototype code are what make the original worth reading.
[READ ORIGINAL →]