Compression algorithm for JSON encoded packets?

前端 未结 7 1654
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:52

    I have found that the compression algorithm tends to be more effective than choosing an alternative format. If this is a 'real-time' compression, I would recommend investigating a lower-level Brotli or Zstandard compressor (the high level ones take a lot CPU - but do give very good compression).

    If you want to read about all the alternatives and how I came to that conclusion, the full details can be found on the Lucidchart techblog.

提交回复
热议问题