Add saltpack's baseX family of codecs #17
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
need more info
need verification for fix
not so hard
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-tplgy/cppcodec#17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.