Skip to content

About compression

Jasonsalex edited this page Aug 15, 2017 · 1 revision

About the compression mode used by kiss-rpc

  • data compression: using Google snappy compression technology to support forced compression and dynamic compression, flexible compression methods can be applied to a variety of scenarios.

  • dynamic compression technique: when data packets larger than 200 bytes or set the threshold, compressed packet, otherwise not compressed packets, use and help to improve the performance of space, response will be based on whether the request needs dynamic data compression.

  • single request compression: compression of a single request request, and response compression based on the way data packets are pressed.

  • pipeline compression: packet compression can be performed on the specified pipeline.

  • Bind socket mode compression

code demo
RpcClient.setSocketCompress(RPC_PACKAGE_COMPRESS_TYPE.RPCT_DYNAMIC); //The dynamic compression mode defaults to more than 200 bytes of compression

RpcClient.setSocketCompress(RPC_PACKAGE_COMPRESS_TYPE.RPCT_COMPRESS); //forced compression method

Clone this wiki locally