pub fn zagzig(val: u64) -> i64
convert an unsigned integer to a signed integer using zigzag decoding.