(input_len: usize)
| 347 | #[allow(clippy::integer_arithmetic)] |
| 348 | #[inline(always)] |
| 349 | pub(crate) fn decoded_len(input_len: usize) -> usize { |
| 350 | // overflow-proof computation of `(3*n)/4` |
| 351 | let k = input_len / 4; |
| 352 | let l = input_len - 4 * k; |
| 353 | 3 * k + (3 * l) / 4 |
| 354 | } |
| 355 | |
| 356 | /// Branchless match that a given byte is the `PAD` character |
| 357 | // TODO(tarcieri): explicitly checked/wrapped arithmetic |
no outgoing calls
no test coverage detected