Skip to content
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

fix: issue 89 - correct base64 encoding for Uint8Array in encodeImage function #90

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

jzevin
Copy link
Contributor

@jzevin jzevin commented May 17, 2024

issue 89
Refactor the encodeImage function to fix a bug where large Uint8Arrays could cause a RangeError due to exceeding the maximum argument length of String.fromCharCode.apply. The new implementation iterates through the Uint8Array and builds the binary string manually, ensuring proper conversion for arrays of any size.

Refactor the encodeImage function to fix a bug where large Uint8Arrays
could cause a RangeError due to exceeding the maximum argument length
of String.fromCharCode.apply. The new implementation iterates through
the Uint8Array and builds the binary string manually, ensuring proper
conversion for arrays of any size.
Copy link
Collaborator

@BruceMacD BruceMacD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, merging this for the next release.

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.

2 participants