NotionCommotion Posted April 15, 2017 Share Posted April 15, 2017 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 More sharing options...
requinix Posted April 16, 2017 Share Posted April 16, 2017 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. Link to comment Share on other sites More sharing options...
NotionCommotion Posted April 16, 2017 Author Share Posted April 16, 2017 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 More sharing options...
requinix Posted April 16, 2017 Share Posted April 16, 2017 Then it's also likely they would have zlib... If you're limited to CBOR or MessagePack then your hands are tied. That CBOR implementation looks nicer to use, but I think it would be more important to decide for the C side of it first. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.