pub fn zigzag_encode(value: i32) -> u32Expand description
Encode a value using zig-zag encoding.
Maps signed integers to unsigned integers so that small magnitude values (positive or negative) have small encoded values.
0 -> 0, -1 -> 1, 1 -> 2, -2 -> 3, 2 -> 4, ...