GPT-5.6 Sol Pro compresses SQLite revision history over 250x
The idea started as a walking-around problem: how to store the full revision history of a constantly edited piece of text in a relational database without one row per edit ballooning storage. The usual approach, a row per prior version, means every edit to a 20 KB document adds another 20 KB to the database. The author's alternative: keep the entire history of a document as a single JSON array of strings in one SQLite BLOB column, then compress that whole array with Zstandard (or zlib), so the large amount of text repeated between near-identical revisions gets squeezed out at once instead of sitting uncompressed row by row. A second column would hold a matching JSON array of Unix timestamps, left uncompressed since integers do not compress well and do not need to.
The author first talked the scheme through out loud using the GPT-Live voice mode in the ChatGPT iPhone app, describing it as a stream of consciousness, then stopped voice mode and typed a short text prompt to GPT-5.6 Sol Pro: "Use Python and Build experimental prototypes around this idea." The model worked for 38 minutes and returned a set of Python prototype files that implement and test the scheme.
The test result: 1,000 simulated revisions to a document produced 20.4 MB of raw revision text, which Zstandard compression, applied to the whole array as JSON, cut to 80.3 KB, a reduction of more than 250 times. The author calls the approach a success on that basis.
Sol also flagged a cost of the simple version: compressing and storing the entire history as one blob means decompressing and recompressing the whole thing on every single edit. To avoid that overhead, it suggested splitting the history across multiple rows, with each row capped at either 128 revisions or 3 MB of uncompressed JSON, so only the current row needs to be touched on a typical edit.
Key facts
- The scheme stores every prior version of a text as one JSON array of strings, compressed together with Zstandard, in a single SQLite BLOB column, instead of one row per revision.
- In a test of 1,000 simulated revisions, 20.4 MB of raw revision text compressed to 80.3 KB as a Zstandard-compressed JSON array, more than a 250-fold reduction.
- The author first talked through the idea in ChatGPT's GPT-Live voice mode, then prompted GPT-5.6 Sol Pro in text to build and test a Python prototype, which took the model 38 minutes.
- To avoid recompressing the entire history on every edit, GPT-5.6 Sol Pro (referred to as Sol) suggested splitting history across multiple rows, each capped at 128 revisions or 3 MB of uncompressed JSON.
- Revision timestamps are kept in a separate, uncompressed JSON array of Unix integers, since they compress poorly and do not need to be shrunk.
Why it matters
Storing edit history in a relational database usually means a full new row for every revision, which multiplies storage for any document that gets edited often. This prototype shows that bundling all past versions of a document into one compressed blob, rather than storing each revision separately, can exploit the large overlap between near-identical revisions and cut storage by hundreds of times. It is also a small case study in prompt-to-prototype workflow: an idea talked through in voice mode, then handed to a model as a short text prompt that returned a working, tested implementation.
Who it affects
Developers building anything on SQLite that needs to keep a full edit history, such as note-taking apps, content-management tools, collaborative editors, or any system that logs every version of a text field, are the direct audience. It is also relevant to anyone curious about using voice-mode brainstorming followed by a text prompt to a coding model as a way to go from idea to tested code.
How to use it
The scheme needs two columns: one BLOB holding a Zstandard- or zlib-compressed JSON array of every past text version, and one uncompressed JSON array of matching Unix timestamps. Following Sol's refinement, history should be split across multiple rows once a row would exceed 128 revisions or 3 MB of uncompressed JSON, so a typical edit only has to decompress and recompress the current row rather than the entire history.
How solid is it
The result rests on a single simulated benchmark: 1,000 revisions to one document, going from 20.4 MB raw to 80.3 KB compressed. The author reports the approach "works really well" on that basis. No comparison of read or query performance is given, only the storage size before and after compression, and no production system or shipped product uses the scheme yet; it is a tested prototype, not a deployment.
Risks and caveats
This is a prototype validated on one synthetic test case, not a real editing workload, so the compression ratio may not hold for documents with different edit patterns. The source does not say how expensive it is to decompress and read an old revision, only that the row-splitting scheme was designed to limit how much has to be recompressed on write. Zlib, the author's original alternative to Zstandard, does not appear to have been tested in the prototype.
“Use Python and Build experimental prototypes around this idea”
— the author, in the text prompt sent to GPT-5.6 Sol Pro after ending the voice-mode session