Re: CBOR-LD

Hi,

>> I was wondering about the compression ratio of CBOR; I have not found 
>> real data. I have tested some of my JSON-LD files and, on the average, 
>> the compression of the JSON data was around 50%. But my files are 
>> small, ie, this may not be significant. Anyone has some bigger data 
> that one can test with?
> 
> fwiw, I used a combination of [1-2] where I replaced cbor with cbor2 and
> used a json dump as test dict to benchmark various serialization formats
> on a real-world ~100MB JSON dump of ours (alternatively, you can generate
> a synthetic dump via http://www.json-generator.com). Results + Python
> script can be found at [3].
> 
> TL&DR: cbor compression on ~100MB plain JSON with lots of strings was still at 80% of the original file size.

For your information: there are other alternatives to CBOR also.
For example there is EXI4JSON [1] which has the advantage of using a string table by default to represent repetitive strings.
Note: EXI is a W3C standard.

You may want to use the following simple demonstration page:
http://exificient.github.io/javascript/demo/processJSON.html

It allows you to insert your JSON data and immediately see the compression ratio etc.

Hope this is useful,

-- Daniel

[1] https://www.w3.org/TR/exi-for-json/

Received on Friday, 1 March 2019 10:12:42 UTC