Stream compression: lz4
I'd like to have a stream pass compressed data using the lz4 option. This would offer improved performance in applications passing text messages across network boundaries in a simple way.
A new socket option, ZMQ_LZ4 (70), would be used to identify the feature. setsockopt/getsockopt would be used to set/query the compression state.
The feature would be a build option, set by autoconfig. I initially envisage the implementing the feature in options_t/socket_base_t and only touching actual sockets if necessary.
I would be grateful to hear the thoughts of the community on this. I need such a facility on a project I am currently working on as we handle potentially large JSON payloads. It seems consistent to have zmq do the compression, and lz4 is publicly exposed by zfs and other systems.
Source: zeromq/libzmq