lz4 / lz4-java

LZ4 compression for Java
Apache License 2.0
1.1k stars 253 forks source link

Added option to compress/decompress using memory pointers #127

Open merlimat opened 5 years ago

merlimat commented 5 years ago

In same case it might beneficial to be able to compress/decompress from direct memory buffer that don't necessarily belong to a ByteBuffer instance.

In that case it's possible, in unsafe Java world, to have a long that represent a pointer to a memory location. Passing that through JNI would be the most efficient way to compress that data.

merlimat commented 5 years ago

@odaira Can you take a look at this? It's on the same line as what described in #106

merlimat commented 5 years ago

@odaira Any chance on this one? :)

odaira commented 5 years ago

@merlimat Sorry for the slow process. I'll include this to 1.6.0 once the review is done.

merlimat commented 5 years ago

👍 Thanks!

odaira commented 5 years ago

Sorry, I must release 1.6.0 as soon as possible, so let me push this off until 1.7.0.

emkornfield commented 3 years ago

Any plans on merging this?

p4654545 commented 3 years ago

+1

Our case is to compress/decompress blocks of memory where both source and destination are allocated with Unsafe.allocateMemory().