System.VarintBitConverter.GetVarintBytes C# (CSharp) Method

GetVarintBytes() public static method

Returns the specified 32-bit signed value as varint encoded array of bytes.
public static GetVarintBytes ( int value ) : byte[]
value int 32-bit signed value
return byte[]
        public static byte[] GetVarintBytes(int value)
        {
            var zigzag = EncodeZigZag(value, 32);
            return GetVarintBytes((ulong)zigzag);
        }

Same methods

VarintBitConverter::GetVarintBytes ( byte value ) : byte[]
VarintBitConverter::GetVarintBytes ( long value ) : byte[]
VarintBitConverter::GetVarintBytes ( short value ) : byte[]
VarintBitConverter::GetVarintBytes ( uint value ) : byte[]
VarintBitConverter::GetVarintBytes ( ulong value ) : byte[]
VarintBitConverter::GetVarintBytes ( ushort value ) : byte[]