mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
BrotliInputStream.java issue when using both read() followed by read(byte b[]) #461
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dannygonzalez on GitHub (Jun 7, 2023).
We are currently using maven to pull in the brotli library into our Java application. The latest version seems to be 0.1.2.
I'm not sure how this is so far behind the released version but nevertheless the code for BrotliInputStream.java doesn't seem to have changed.
There is an issue with BrotliInputStream where if you do one or more
read()calls followed byread(byte b[]), theread(byte b[])call will incorrectly return -1 even though there was more data succesfully read in to the buffer.It should return the number of bytes read into the buffer, not -1.
Should BrotliInputStream.java line 121 be:
remainingBufferBytes = read(buffer, 0, 1);instead of:
remainingBufferBytes = read(buffer, 0, buffer.length);@eustas commented on GitHub (Jun 7, 2023):
Will take a look soon
@eustas commented on GitHub (Jun 7, 2023):
Executed test on fresh build. Result:
Perhaps we just need to publish a fresh version. Likely
1.0=)@dannygonzalez commented on GitHub (Jun 7, 2023):
Thanks for testing @eustas
Would it be possible to publish the latest version?
@eustas commented on GitHub (Jun 7, 2023):
Sure!
@eustas commented on GitHub (Aug 3, 2023):
Moved to #1056