Storing Text History in SQLite: 1,000 Revisions Compress from 20MB to 80KB

Simon Willison · rss · 2026-08-10

Developer Simon Willison shares an efficient scheme for storing text revision histories in SQLite: bundling all prior versions into a JSON array and applying Zstandard or zlib compression to the entire blob.

After discussing the idea with ChatGPT's advanced voice mode, he had GPT-5.6 Sol Pro write the prototype. The results were impressive: 1,000 simulated revisions generating 20.4 MB of raw text compressed down to just 80.3 KB. To avoid the overhead of decompressing the whole array on every edit, the model suggested splitting the history across multiple rows, each containing up to 128 revisions or 3MB of uncompressed JSON.

Original post →

More from coding & agent

coding & agent channel →