Skip to main content

szx_from_block_size

Function szx_from_block_size 

Source
pub fn szx_from_block_size(size: usize) -> Option<u8>
Expand description

Converts a block size in bytes to the corresponding SZX exponent.

Returns None if the size is not a valid power of 2 in the range 16..=1024 (szx 0..=6).