mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
[PR #1104] [MERGED] Java wrapper Encoder wrong length #1653
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?
📋 Pull Request Information
Original PR: https://github.com/google/brotli/pull/1104
Author: @hyperxpro
Created: 12/28/2023
Status: ✅ Merged
Merged: 1/3/2024
Merged by: @copybara-service[bot]
Base:
master← Head:encode-fix📝 Commits (2)
428d056Fix Encoder bug79a5e80Merge branch 'master' into encode-fix📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
java/org/brotli/wrapper/enc/Encoder.java(+1 -1)📄 Description
Problem:
Currently, the Java wrapper Encoder is passing byte array length for finishing the encoding of data. This is ideal when the encoder is used with offset 0 and full length is passed but for cases where offset is passed and length is also specified, it leads to encoded data corruption.
Changes:
Instead of passing byte array length to the
pushmethod, we will now passlengthdirectly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.