GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Encoder wrong length during `push` op by hyperxpro · Pull Request #127 · hyperxpro/Brotli4j

Conversation

@hyperxpro

@hyperxpro hyperxpro commented Dec 28, 2023

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hyperxpro
Update Encoder.java
c2a5252
@hyperxpro hyperxpro linked an issue Dec 28, 2023 that may be closed by this pull request
Unable to compress correctly if input data does not start from 0. #126
Closed
@hyperxpro
hyperxpro merged commit 8f178b8 into main Dec 28, 2023
@hyperxpro
hyperxpro deleted the encoder-fix branch December 28, 2023 20:23
@deshanxiao

deshanxiao commented Dec 29, 2023

Copy link
Copy Markdown
Contributor

Thanks for your quick fix @hyperxpro.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hyperxpro

hyperxpro commented Dec 29, 2023

Copy link
Copy Markdown
Owner Author

Yup, cutting v1.15.0 release now.

deshanxiao reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@hyperxpro @deshanxiao
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.