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

Exception in thread "main" net.jpountz.lz4.LZ4Exception: Malformed input at 16 #208

Open
tejaspatel1990 opened this issue May 3, 2023 · 3 comments

Comments

@tejaspatel1990
Copy link

tejaspatel1990 commented May 3, 2023

I am getting this exception while decompressing my data. This doesn't happen every time, and I am not able to reproduce this issue on my local. But we see this issue on one of our environment using 1.5.0 lz4 version for compression while 1.8.0 is used for decompression. Following is the error I get :

Exception in thread "main" net.jpountz.lz4.LZ4Exception: Malformed input at 16
at net.jpountz.lz4.LZ4JavaUnsafeFastDecompressor.decompress(LZ4JavaUnsafeFastDecompressor.java:78)

Compression code :

String encodedData = "Json" // Json string

	byte[] byteArray = encodedData.getBytes(StandardCharsets.UTF_8);

net.jpountz.lz4.LZ4Compressor compressor = factory.fastCompressor();
return compressor.compress(data);

Decompression code:

LZ4FastDecompressor decompressor = factory.fastDecompressor();
byte[] decompressData = new byte[decompressedLength];
decompressor.decompress(compressedData, 0, decompressData, 0, decompressedLength);

Can you some one please help me to first reproduce this issue secondly to solve it.

@tejaspatel1990
Copy link
Author

@ido @JoshRosen @clockfort : Can you please help

@tejaspatel1990
Copy link
Author

odaira

@tejaspatel1990
Copy link
Author

@odaira

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

1 participant