PERWAPI.MetaDataInStream.ReadCompressedNum C# (CSharp) Méthode

ReadCompressedNum() public méthode

public ReadCompressedNum ( ) : uint
Résultat uint
        public uint ReadCompressedNum()
        {
            //int pos = (int)BaseStream.Position;
            //Console.WriteLine("Position = " + BaseStream.Position);
            byte b = ReadByte();
            //pos++;
            uint num = 0;
            if (b <= 0x7F) {
                num = b;
                //Console.WriteLine("Bytes = " + b);
            } else if (b >= 0xC0) {
                num = (uint)(((b - 0xC0) << 24) + (ReadByte() << 16) + (ReadByte() << 8) + ReadByte());
                //Console.WriteLine("Bytes = " + b + " " + Hex.Byte(data[pos++]) + " " + Hex.Byte(data[pos++]) + " " + Hex.Byte(data[pos++]));
            } else { // (b >= 0x80) && (b < 0xC0)
                num = (uint)((b - 0x80) << 8) + ReadByte();
                //Console.WriteLine("Bytes = " + b + " " + Hex.Byte(data[pos++]));
            }
            //Console.WriteLine("Compressed Num = " + num);
            return num;
        }