-
Notifications
You must be signed in to change notification settings - Fork 246
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
Data larger than 4194304 Bytes is not decompressed correctly #203
Comments
That's because you are decompressing only one block (you should call byte[] decompressedData = new byte[data.length];
compressedInputStream.read(decompressedData); Try: byte[] decompressedData = compressedInputStream.readAllBytes(); |
I can't control what the callers do and the callers have no specific knowledge which type of InputStream this is. I ended up writing an adapter that extends InputStream and delegates to LZ4FrameInputStream to add some reset capability and to chunk read when read is asked to read > 4194304 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The above assertion passes. If you update the code to
data = new byte[4194305];
then the assertion fails and the 4194305th element of decompressedData (decompressedData[4194304]) will equal 0The text was updated successfully, but these errors were encountered: