pub fn zigzag(n: i32) -> u32
Applies zigzag encoding to transform a signed integer into an unsigned integer.