Closed llogiq closed 7 years ago
I think it's because LZ4BlockInputStream
can only decode what LZ4BlockOutputStream
wrote, as they are using a home-made frame format, and not the official one. See #21.
As you can see on lz4 homepage, there is currently no inter-operable java binding. And it doesn't look like this one is getting updated soon.
I'm working on adding this feature in Gyscos/lz4-java.
Currently the decompressing part is in progress, using the new LZ4CompatibleInputStream
.
I'll send a PR when I get the compression part ready. Open to suggestions for naming conventions, etc.
Gyscos/lz4-java should be in a reasonable state. PR is here: #77.
EDIT: Just noticed PR #61 <_< You're probably better off using their higher-quality code instead.
I have merged LZ4-frame-compatible implementation from #61.
Tested with 1.3 and HEAD (as of November 19th 2015) on Linux with the following JDK:
The exception (not that there's anything new here):
The code that calls it (the example is so minimal that I'm posting it here verbatim):
Note that calling
lz4 -t
on the file given inargs[0]
returns successfully. The file in question is 613632000 bytes long and was packed with*** LZ4 Compression CLI 64-bits r122, by Yann Collet (Sep 18 2014) ***