Allow to create LZ4BlockInputStream with LZ4SafeDecompressor by meshcow · Pull Request #3 · yawkat/lz4-java
We'd really appreciate this being merged soon if possible.
Currently we were using LZ4Factory.nativeInstance() and fastCompressor and fastDecompressor methods. And the results made me very nervous at first.
org.lz4 (1.8.0)
Average Write Time (ms): 210
Average Read Time (ms): 36at.yawk.lz4 (1.8.1)
Average Write Time (ms): 211
Average Read Time (ms): 214at.yawk.lz4 (1.9.0)
Average Write Time (ms): 224
Average Read Time (ms): 253
However, it turns out safeDecompressor (still using LZ4Factory.nativeInstance) is indeed faster than fastDecompressor and did seem to restore performance to an acceptable level
Average Write Time (ms): 210
Average Read Time (ms): 32
So this covers the direct factory methods, but still leaves open the block input stream as this issue mentions, and which we do use in our code.