by simonw · 4y ago · 0 comments
I guess repetitive JSON compresses REALLY well.
I tried playing with it in SQLite but that CvrExport JSON needs some extra work to break it up into separate tables for it to be readable.
Here's a demo that shows the other tables but ignores the 300MB+ one: https://lite.datasette.io/?sql=https://gist.githubuserconten...
This is a different technique from entropy coding, which gets its improvements by allocating fewer bits for more frequent symbols. But most modern compresses uses a mix, for example gzip uses DEFLATE, which is a combination of literal backrefs and dynamic and static Huffman tables.
and Yes, JSON is usually absurdly compressible.
Not only is it so small, but it's easy to improve while remaining compatible with zip:
Infozip -9 -> 5693Kb
zopfli -> 5437Kb