Skip to content

Directly pad and b64decode string#50

Merged
colinta merged 1 commit intocolinta:mainfrom
deathaxe:feat/enhance-b64encode
Dec 9, 2024
Merged

Directly pad and b64decode string#50
colinta merged 1 commit intocolinta:mainfrom
deathaxe:feat/enhance-b64encode

Conversation

@deathaxe
Copy link
Copy Markdown

@deathaxe deathaxe commented Dec 8, 2024

This PR applies a lessons learned:

Conversion to bytearray can be omitted as b64decode works on str() directly,
even more efficiently by using memoryview() instead of copying data.

It also outputs some more detailed error messages, when encoded input contains non-ASCII chars.

Note: just read about it few mins ago.

Conversion to bytearray can be omitted as b64decode can work on `str()`
directly, even more efficiently by using memoryview() instead of copying data.
@colinta colinta merged commit 66dfd08 into colinta:main Dec 9, 2024
@deathaxe deathaxe deleted the feat/enhance-b64encode branch December 9, 2024 16:41
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