Comparison to binary JSON formats
Closed this issue · 5 comments
Would be interesting to see how this compares to simply using MessagePack or CBOR for encoding.
Agreed. Although I think the binary JSON size will be comparable to just JSON gzipped, with Geobuf still having a huge benefit.
Let's make a test. Where can I find the us-zips.json and idaho.json test data from the README?
Here's the Idaho GeoJSON: https://github.com/mapbox/geojson-fixtures/blob/master/data/featurecollection/idaho.geojson
I have to upload the us-zips sample somewhere — don't want to commit it to a repo.
Interesting, I did a test with CBOR (sizes of MessagePack are virtually identical):
normal | gzipped | |
---|---|---|
idaho.json | 10.92 MB | 2.66 MB |
idaho.cbor | 7.47 MB | 4.50 MB |
I used 7zip with fastest setting for gzipping. I didn't expect CBOR to compress that much worse compared to plain JSON.
Ha! I knew it would be bad but didn't think it's that bad. Great!