horrorho / RagingMoose

Experimental Java LZFSE capable decompressor.
MIT License
4 stars 3 forks source link

JNI decoding method #1

Closed oct-test closed 6 years ago

oct-test commented 6 years ago

Is it possible to decompress any file if I read the file chunk by chunk? I want to avoid "out of memory" error by reading the compressed file chunk by chunk. I wanted to use the JNI approach to decompress the file.

horrorho commented 6 years ago

Hi there. As I'm sure you're aware, JNI here just exposes LZFSE library calls. Unless I'm mistaken this functionality is not available in the reference LZFSE implementation.

RagingMoose decompresses in a block wise manner. However I would recommend using the LZFSE reference implementation if at all possible. The decompression code is not trivial and this my first time coding a decompressor. Despite the unit tests, subtle bugs may remain.

There is an open ticket regarding a streaming API, which is what i think you're after: https://github.com/lzfse/lzfse/issues/6

I would suggest following this issue up on the LZFSE issue tracker. Once the requisite functionality becomes available on the the reference implementation you can build the appropriate JNI interface.