lz4-java icon indicating copy to clipboard operation
lz4-java copied to clipboard

lz4 legacy format support (typically for Linux Kernel compression)

Open cfig opened this issue 2 years ago • 1 comments
trafficstars

Can you add support of the lz4 legacy format, which is still used in linux kernel? Both compress/decompress are needed.

Test case:

1. create the legacy lz4 file:

cat file | lz4 -l -12 --favor-decSpeed > file.lz4

I want a java compressor to achieve this without the external lz4 command tool.

2. Testing the file

command

lz4 -t  file.lz4 -vv

output shows

*** LZ4 command line interface 64-bits v1.9.3, by Yann Collet ***
_POSIX_C_SOURCE defined: 200809L
_POSIX_VERSION defined: 200809L
PLATFORM_POSIX_VERSION defined: 200809L
Detected : Legacy format 
file.lz4             : decoded 1048576 bytes                                   
Done in 0.00 sec  

The "Legacy format" is what we need.

3. decompress etc.

I want a java decompressor to achieve this without the external lz4(or lz4cat) command tool.

Will you consider supporting the legacy format?

Thanks

cfig avatar Apr 01 '23 16:04 cfig

Any comments on this topic?

cfig avatar Jun 06 '23 05:06 cfig