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

Implement Base32 decoding for new EncoderDecoder #55

Merged
merged 9 commits into from
Jan 20, 2023

Conversation

05nelsonm
Copy link
Owner

Part 2 of #41

This PR:

  • Implements the decoding for all 3 spec's (Crockford, RFC 4648 section 6, RFC 4648 section 7) using the new EncoderDecoder
  • Maps the old decoding extension function bodies to use the new EncoderDecoder for Base32.
  • Creates a new class for commonizing bit buffers (so it can be reusable in higher level modules, such as Base32).
  • Fixed a bug in Decoder extension functions where padding was being sent unnecessarily.

@05nelsonm 05nelsonm self-assigned this Jan 20, 2023
Copy link
Owner Author

@05nelsonm 05nelsonm left a comment

Choose a reason for hiding this comment

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

I think in 2 or so refactors and adding tests, this will be pretty solid implementation. After adding the BitBuffer abstraction, it is really simple to create encoders.

I think though there can be more things shifted to encoding-core, like skipping over new lines/spaces, or handling padding. Those 2 things are expressed in the base configuration and should be used to mitigate duplicate, unnecessary code.

library/encoding-core/api/encoding-core.api Outdated Show resolved Hide resolved
@05nelsonm
Copy link
Owner Author

I think though there can be more things shifted to encoding-core, like skipping over new lines/spaces, or handling padding. Those 2 things are expressed in the base configuration and should be used to mitigate duplicate, unnecessary code.

Resolved in commit 52f426b 💪

@05nelsonm 05nelsonm merged commit 6dd97f9 into master Jan 20, 2023
@05nelsonm 05nelsonm deleted the issue/41-implement-base32-decoder branch January 20, 2023 22:25
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.

None yet

1 participant