Open
Description
The high-level encode
function is still slightly unergonomic for the common use case of encoding a whole number of bytes.
As far as i can tell, the only errors possible for encode
are:
bits
doesn't match length ofinput
- total encoded value will exceed the ability to allocate RAM
For the common use case it would be nice to have something like:
pub fn encode_full_bytes(input: &[u8]) -> Result(String, ZBase32Error)
or even (treating memory allocation failures as unrecoverable errors):
pub fn encode_full_bytes(input: &[u8]) -> String
(this latter interface is offered by the popular zbase32
crate, so implementing it would make it easier for people to move from zbase32
to this implementation)
Metadata
Metadata
Assignees
Labels
No labels