Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning should be given first thing in the GitHub page that this library is not interoperable with other LZ4 tooling #222

Open
Andyterrify opened this issue Jul 17, 2024 · 7 comments

Comments

@Andyterrify
Copy link

As the title suggests. A warning is given on the LZ4 wiki page that this library does not conform the LZ4 standard and will not work with standard tooling. This looks to be a common issue (#184, #194 ) with people attempting to decompress files created with this library in other languages (or vice versa) and failing.
A deviation from the standard should be mentioned, especially as this repo is under the lz4 account.

@emasab
Copy link

emasab commented Aug 16, 2024

Is it true, is there some version that produces output not interoperable with previous versions of other tools too?

@emasab
Copy link

emasab commented Aug 16, 2024

I see that this is among the custom (not interoperable) implementations in https://lz4.org/ homepage
Because

They use the block compression format, but add their own frame / header logic (or none at all) Consequently, they are not interoperable with LZ4 command line utility, nor (generally) between themselves.

just it's unexpected because they come from the same official GitHub account.

@Andyterrify
Copy link
Author

Andyterrify commented Aug 16, 2024 via email

@Andyterrify
Copy link
Author

Andyterrify commented Aug 16, 2024 via email

@emasab
Copy link

emasab commented Aug 18, 2024

I was checking these comments and seems like the official frame format was implemented in 1.4.0

#21 (comment)
#21 (comment)

@Cyan4973
Copy link
Member

Cyan4973 commented Aug 23, 2024

Looking at the documentation,
this java implementation seems to offer 2 sets of API,
one is LZ4Compressor/LZ4SafeDecompressor,
the other is LZ4FrameOutputStream/LZ4FrameInputStream.

The LZ4Frame API should be directly compatible with lz4 CLI.

The other API likely builds on top of the inner lz4 block format, and may or may not add some metadata of its own, making it incompatible with the lz4 CLI and other interoperable LZ4 decoders.

Maybe this distinction should be better documented.

@Andyterrify
Copy link
Author

Andyterrify commented Aug 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants