Jump to content

Compressing JSON


NotionCommotion

Recommended Posts

I am using JSON to pass data between two non-browser machines, and would like to compress it, and am considering CBOR and MessagePack.  Does anyone have any experience with either, or any recommendations how to proceed?  Looking at both their sites, I found that http://cbor.io/ includes a link to https://github.com/2tvenom/CBOREncode and http://msgpack.org/ includes linkes to https://github.com/rybakit/msgpack.php and https://github.com/msgpack/msgpack-php. Google searches found other gitub solutions as well.  Any experience with any of them?  Thanks

Link to comment
Share on other sites

I'd just go with gzip/zlib encoding. Do you want to use a third-party library for a particular reason?

 

Whatever it is, try them out and see what you get. Consider runtime, memory usage, and of course compression ratios.

 

My reason for wanting to use these two is that the other non-PHP machine supports them.  https://github.com/nlohmann/json.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.