Re:ZSON, PostgreSQL extension for compressing JSONB
by brianolson on Tuesday October 04, 2016 @11:04AM
(#12636064)
Another way to make 'JSON' smaller is to instead use 'CBOR', schema compatible 'concise binary object representation'. (See IETF RFC 7049 or http://cbor.io/ ) CBOR encodes and decodes faster too. Or use the 'snappy' compressor.
[ Parent
| on HN ]
Re:ZSON, PostgreSQL extension for compressing JSONB
by afiskon on Tuesday October 04, 2016 @11:47AM
(#12636394)
I'm afraid Snappy will not help, at least a lot. PostgreSQL already has a build-in compression (PGLZ). I tested various different algorithms before this shared-dictionary-idea - lz4, bzip and others. Some compress a bit better, other a bit faster, but in general result is almost the same.
Re:ZSON, PostgreSQL extension for compressing JSONB
by tveita on Tuesday October 04, 2016 @12:37PM
(#12636789)
Did you test e.g. LZ4 with a prebuilt dictionary? With a good way to find substrings for the dictionary it might generalize well to other kinds of data.
Re:ZSON, PostgreSQL extension for compressing JSONB
by afiskon on Wednesday October 05, 2016 @06:06AM
(#12642696)
Frankly I don't remember, it was more then half a year ago.
LZ4 is a LZ77 family algorithm which means its dictionary is a "shifting window". I don't believe such kind of dictionary will fit in this case.