System.VarintBitConverter.EncodeZigZag C# (CSharp) Méthode

EncodeZigZag() private static méthode

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