System.VarintBitConverter.ToInt16 C# (CSharp) Method

ToInt16() public static method

Returns 16-bit signed value from varint encoded array of bytes.
public static ToInt16 ( byte bytes ) : short
bytes byte Varint encoded array of bytes.
return short
        public static short ToInt16(byte[] bytes)
        {
            var zigzag = ToTarget(bytes, 16);
            return (short)DecodeZigZag(zigzag);
        }