MsgPack for compressing json data, why not using gzip/deflate?
Asked Answered
A

1

24

I heard something about MsgPack that can be used for compressing json messages, but I have a question about that, why not simply using Gzip/Deflate instead of MsgPack? I think it's so better to debugging also.

Aerugo answered 16/10, 2012 at 19:10 Comment(2)
There's no real difference in size between JSON and MsgPack after gzip. (benchmarks)Bobbysoxer
Another test that gives some thought about it peterbe.com/plog/msgpack-vs-json-with-gzipRowdy
D
36

msgpack is an efficient binary serialization format that you may want to choose as an alternative to JSON according to your use case.

Even if it is advertised as like JSON, but fast and small, it is not intended to compress JSON data. Once again think of it as an alternative, and keep in mind that as stated by its author:

there are many situations where it simply does not offer enough advantage to JSON

I would greatly recommend you to read this article - My thoughts on MessagePack, written by msgpack's author, that includes everything you need to know vs. recommended msgpack use cases, pros/cons and other useful pointers related to msgpack and JSON.

Derril answered 17/10, 2012 at 8:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.