FSO.Files.Utils.IoBuffer.ReadVarLen C# (CSharp) Method

ReadVarLen() public method

Reads a variable length unsigned integer from the current stream.
public ReadVarLen ( ) : uint
return uint
        public uint ReadVarLen()
        {
            uint result = 0;
            int shift = 0;
            byte read = 0x80;
            while ((read&0x80) > 0)
            {
                read = ReadByte();
                result |= (uint)((read & 0x7F) << shift);
                shift += 7;
            }
            return result;
        }