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

Add saltpack's baseX family of codecs #17

Open
jpetso opened this issue Feb 4, 2016 · 0 comments
Open

Add saltpack's baseX family of codecs #17

jpetso opened this issue Feb 4, 2016 · 0 comments

Comments

@jpetso
Copy link
Collaborator

jpetso commented Feb 4, 2016

See https://saltpack.org/armoring for the specification. Should be a fun exercise as follow-up to adding Base85, since the calculation (and differences from currently implemented codecs) is largely the same.

It seems the alphabet and binary block size should be passed as template arguments.

For the calculation of encoded/decoded sizes, in case the current calculation isn't synonymous with their "most direct way to compute [it]", we could use log2() from https://github.com/elbeno/constexpr. I'll have to check whether it is synonymous.

For block sizes > 8 bytes, a bignum library will be necessary. I'm thinking we should probably statically assert in this case if included without an extra bignum library, and use a specialized template (that doesn't assert) otherwise. We can provide an extra header to provide that specialized template, avoiding to e.g. hardcode a boost dependency in the main header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant