private static long EncodeZigZag(long value, int bitLength) { return (value << 1) ^ (value >> (bitLength - 1)); }