guoyuhong opened a new pull request #979: Add LZ4 compression method URL: https://github.com/apache/incubator-brpc/pull/979 Related issur: https://github.com/apache/incubator-brpc/issues/415 Implementation: Add Lz4 v1.9.2 source code to `src/butil/third_party/lz4` and add `src/brpc/policy/lz4_compress.cpp`. Lz4 compression is not friendly to `butil::IOBuf` which contains separated bufer. To avoid frequent heap allocation, this implementation will check whether the input and output data could be put into the available butil::IOBuf buffer. If so, the inplace compression/decompression will be used. The inplace compression/decompression ratio is tested from `brpc_snappy_compress_unittest`: ``` totalCompressTimes=26272 inplaceCompressTimes=17132 inplaceCompressRate=0.652101 totalDecompressTimes=26272 inplaceDecompressTimes=17803 inplaceDecmpressRate=0.677642 ``` The through put result will be put later.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
