Avro.BinaryDecoder.ReadLong C# (CSharp) Method

ReadLong() public method

int and long values are written using variable-length, zig-zag coding.
public ReadLong ( Stream Stream ) : long
Stream Stream
return long
        public long ReadLong(Stream Stream)
        {
            byte b = read(Stream);
            ulong n = b & 0x7FUL;
            int shift = 7;
            while ((b & 0x80) != 0)
            {
                b = read(Stream);
                n |= (b & 0x7FUL) << shift;
                shift += 7;
            }
            return Util.Zag(n);

        }