Skip to content

Add an even higher-level API for people operating with full-octet streams #5

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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