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

ByteVectorInputStream returning value out of range #369

Closed
christiankjaer opened this issue Apr 25, 2022 · 0 comments · Fixed by #370
Closed

ByteVectorInputStream returning value out of range #369

christiankjaer opened this issue Apr 25, 2022 · 0 comments · Fixed by #370

Comments

@christiankjaer
Copy link
Contributor

I am using a GZIPInputStream around a bytevector inputstream (new GZIPInputStream(bytes.toInputStream))

And I get an error:

[error] java.io.IOException: scodec.bits.ByteVector$ByteVectorInputStream.read() returned value out of range -1..255: -117
[error]         at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:272)
[error]         at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:259)
[error]         at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)
[error]         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)
[error]         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:91)

Is this a known issue? It seems like read returns a signed byte where it should return in [0, 255].

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

Successfully merging a pull request may close this issue.

1 participant