Skip to main content

block_size_from_szx

Function block_size_from_szx 

Source
pub fn block_size_from_szx(szx: u8) -> usize
Expand description

Converts an SZX exponent to the actual block size in bytes.

RFC 7959 §2.2: size = 2^(szx + 4). Values of szx above 6 are clamped to 6 (1024 bytes) since larger sizes are reserved.