lz4 / lz4-java

LZ4 compression for Java
Apache License 2.0
1.09k stars 248 forks source link

lz4 legacy format support (typically for Linux Kernel compression) #205

Open cfig opened 1 year ago

cfig commented 1 year ago

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 commented 1 year ago

Any comments on this topic?