You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2019/11/28 11:45:17 UTC
[GitHub] [incubator-brpc] guoyuhong opened a new pull request #979: Add LZ4
compression method
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org