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

LZ4BlockInputStream lz4-java-1.1.1 needs to read fully #13

Closed
gabeki opened this issue Feb 27, 2013 · 5 comments
Closed

LZ4BlockInputStream lz4-java-1.1.1 needs to read fully #13

gabeki opened this issue Feb 27, 2013 · 5 comments

Comments

@gabeki
Copy link

gabeki commented Feb 27, 2013

java.io.IOException: Stream is corrupted
at net.jpountz.lz4.LZ4BlockInputStream.refill(LZ4BlockInputStream.java:159)
at net.jpountz.lz4.LZ4BlockInputStream.read(LZ4BlockInputStream.java:123)
at org.apache.commons.io.IOUtils.read(IOUtils.java:2454)
at org.apache.commons.io.IOUtils.read(IOUtils.java:2476)

I think this line

in.read(compressedBuffer, 0, HEADER_LENGTH);

needs to read fully.

@jpountz
Copy link
Collaborator

jpountz commented Feb 28, 2013

You are perfectly right. I fixed this issue a few days ago in the Git repository and will try to make a bugfix release as soon as possible (but likely after March, 15th since I'm on vacation right now...).

Thanks for the bug report, don't hesitate to let me know if you find any other bug!

@gabeki gabeki closed this as completed Mar 1, 2013
@stevenschlansker
Copy link
Contributor

I believe this fix has still not been released? This makes LZ4-Java's streams basically useless, as seems to always fail decompression. A release would be much appreciated!

@jpountz
Copy link
Collaborator

jpountz commented May 1, 2013

Hi Steven. I just release version 1.1.2 (http://repo1.maven.org/maven2/net/jpountz/lz4/lz4/1.1.2/) that contains this fix. Thanks for the remainder and sorry for the delay!

@stevenschlansker
Copy link
Contributor

Thanks!

@Tagar
Copy link

Tagar commented Jan 30, 2017

Might be the same problem as described apache/spark#15632 ?
https://issues.apache.org/jira/browse/SPARK-18105

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

4 participants