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

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

Open tejaspatel1990 opened this issue 2 years ago • 3 comments
trafficstars

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 avatar May 03 '23 15:05 tejaspatel1990

@ido @JoshRosen @clockfort : Can you please help

tejaspatel1990 avatar May 08 '23 14:05 tejaspatel1990

odaira

tejaspatel1990 avatar May 08 '23 19:05 tejaspatel1990

@odaira

tejaspatel1990 avatar May 08 '23 19:05 tejaspatel1990