devela::all

Function bytes_from_bits

Source
pub const fn bytes_from_bits(bit_size: usize) -> usize 
Expand description

Returns the rounded up size in bytes from a size in bits.

This is equivalent to (bit_size + 7) / 8 but handles potential overflow.