-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Unable to compress correctly if input data does not start from 0. #126
Comments
What is the error? Are you getting corrupted data? |
Technically, you should compress all data and then finish the encoding with length |
I got no error but the output array looks unexpected in length. Here is a very simple example: @hyperxpro
|
Okay, looks like a bug. Would you like to raise a PR at https://github.com/google/brotli? |
PTAL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Unable to compress correctly if input data does not start from 0.
To Reproduce
Call Encoder.compress(byte[] x, int offset, int length) will compress all bytes from
x
(offset > 0)Brotli4j/brotli4j/src/main/java/com/aayushatharva/brotli4j/encoder/Encoder.java
Line 73 in 0907a38
data.length -> length ?
Expected behavior
It should only compress the bytes from start to start + len.
Platform (please complete the following information):
ubuntu
Additional context
The text was updated successfully, but these errors were encountered: