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

Pad to a whole number of bytes when encoding bit arrays #751

Closed

Conversation

richard-viney
Copy link
Contributor

Fixes #750.

My main hesitation with this change is that a round trip isn't stable, i.e. bit array -> encode to base 64 string -> decode to bit array doesn't give you back what you started with.

But in practice that's probably not going to cause many problems for people.


This PR also removes bit_array_int_to_u32 and bit_array_int_from_u32 from gleam_stdlib.erl as I couldn't find any reference to them anywhere in the stdlib or compiler. They look to be leftover from some helper functions that were removed a long time ago.

@richard-viney richard-viney marked this pull request as ready for review November 27, 2024 22:28
@richard-viney richard-viney deleted the bit-array-encode-padding branch November 28, 2024 06:10
@richard-viney
Copy link
Contributor Author

Closed in favour of #754

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.

Change return type of _encode functions in bit_array module
1 participant