The problem
- I want to check the encoding is valid without decoding
A bit follow-up to this #191 .
Given an alphabet this seems a useful feature to me. Currently, I'm doing as suggested: decoding, checking for errors and discarding the result but I'm not sure the compiler can always optimize the allocations away.
This is not complex, right? We can check for the 4 kinds of error in DecodeError without decoding.
- Character not in alphabet
- Invalid length
- Invalid symbol before padding
- Invalid padding
Asking for some feedback, I can work on it.
The problem
A bit follow-up to this #191 .
Given an alphabet this seems a useful feature to me. Currently, I'm doing as suggested: decoding, checking for errors and discarding the result but I'm not sure the compiler can always optimize the allocations away.
This is not complex, right? We can check for the 4 kinds of error in
DecodeErrorwithout decoding.Asking for some feedback, I can work on it.