3 ms·
Also, surprisingly often, doing something reasonably workable but far from optimal, and then throwing generic compression algorithms at it, can work very nearly
by kragen 5y ago
Also, surprisingly often, doing something reasonably workable but far from optimal, and then throwing generic compression algorithms at it, can work very nearly as well as carefully doing the precisely optimal thing. SNMP uses BER, which has lots of carefully thought out compact representations for data types, and COAP has CBOR, and in both cases you can usually do as well or better on space by running a simple ASCII syntax through LZW. Usually not that much slower, either.
- rixed 5y agoNot fair, unless you also compress the BER or CBOR (which are primarily intended to serialize/deserialize faster, not to compress)
- kragen 5y agoI don't know if you've ever benchmarked BER and CBOR implementations, but I have, and they're astoundingly shitty at serializing and deserializing faster, even when compared against things like JSON. They do usually beat LZW though.