Skip to content

Conversation

@dkg
Copy link

@dkg dkg commented Feb 12, 2022

There are many circumstances where all parties involved know that the unencoded form will itself be an integer number of octets (that is, that the length of the output bitstream should be a multiple of 8). The current high level API is a bit clumsy for those use cases.

This series adds an even higher-level API that is simple to use in those scenarios. It is a bit asymmetrical, in that the encoding has no error state (all bytestreams are valid input), while decoding does, since there are characters that should never be in z-base-32 (so some charstreams are invalid input).

This should close #1.

Note that it is an expanded API, but it is all entirely backward compatible with previous API. So it probably warrants a minor version bump.

dkg added 3 commits February 11, 2022 18:56
Annotate the parts of the tests that require the std feature.

This is an initial (but not complete) cleanup for DaGenix#2.  A proper fix
would include new tests for the low level interface as well.
This is a much simpler function for a caller that knows they're always
dealing with ranges of full bytes.

Closes: DaGenix#1
This rounds out the ergonomic very high-level API.
@dkg
Copy link
Author

dkg commented May 21, 2022

@DaGenix could you take a look here?

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.

high-level API: simplify encoding a whole number of bytes

1 participant