Compression algorithm for JSON encoded packets?

前端 未结 7 1670
Happy的楠姐
Happy的楠姐 2020-12-14 03:00

What would be the best compression algorithm to use to compress packets before sending them over the wire? The packets are encoded using JSON. Would LZW be a good one for th

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-14 03:37

    Ummm...Correct me if I'm wrong, but if you are implementing on-the-wire compression, then you control both ends of the connection, right? In that case, if JSON is too fat a protocol, why wouldn't you just choose a different wire protocol that isn't as fat? I mean, I understand the appeal of using a standard like JSON, but if you are concerned about bandwidth, then you probably ought to pick a wire protocol that isn't all text.

提交回复
热议问题