Skip to content

Encoder wrong length during push op#127

Merged
hyperxpro merged 1 commit into
mainfrom
encoder-fix
Dec 28, 2023
Merged

Encoder wrong length during push op#127
hyperxpro merged 1 commit into
mainfrom
encoder-fix

Conversation

@hyperxpro

Copy link
Copy Markdown
Owner

Motivation:

Currently, the Java wrapper Encoder passes byte array length for finishing data encoding. 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.

Modification:
Instead of passing byte array length to the push method, we will now pass length directly.

Result:
Error-free encoding

@hyperxpro hyperxpro linked an issue Dec 28, 2023 that may be closed by this pull request
@hyperxpro hyperxpro merged commit 8f178b8 into main Dec 28, 2023
@hyperxpro hyperxpro deleted the encoder-fix branch December 28, 2023 20:23
@deshanxiao

Copy link
Copy Markdown
Contributor

Thanks for your quick fix @hyperxpro.

BTW, Is this worthy of a new fixed version like 1.14.1?

@hyperxpro

Copy link
Copy Markdown
Owner Author

Yup, cutting v1.15.0 release now.

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 this pull request may close these issues.

Unable to compress correctly if input data does not start from 0.

2 participants