Skip to content

Commit

Permalink
Merge pull request #1104 from hyperxpro:encode-fix
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 595388650
  • Loading branch information
copybara-github committed Jan 3, 2024
2 parents 4c57a64 + 79a5e80 commit 0ef82f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/org/brotli/wrapper/enc/Encoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public static byte[] compress(byte[] data, int offset, int length, Parameters pa
int totalOutputSize = 0;
try {
encoder.getInputBuffer().put(data, offset, length);
encoder.push(EncoderJNI.Operation.FINISH, data.length);
encoder.push(EncoderJNI.Operation.FINISH, length);
while (true) {
if (!encoder.isSuccess()) {
throw new IOException("encoding failed");
Expand Down

0 comments on commit 0ef82f0

Please sign in to comment.