I assume the compressor / decompressor code will fail, because it is JNI code and expects to get a DirectByteBuffer.

In the long run, we could add an LZ4 (seems to be fastest) compressor implemented in java. The project on "https://github.com/jpountz/lz4-java" has a cool implementation that uses unsafe (like our memory buffers) to get an extremely fast compressor fully java based (no JNI and hence no need for directbytebuffers)