AsmResolver.OutputStreamExtensions.WriteCompressedUInt32 C# (CSharp) Метод

WriteCompressedUInt32() публичный статический Метод

Compresses and writes an unsigned integer to the stream.
public static WriteCompressedUInt32 ( this writer, uint value ) : void
writer this
value uint
Результат void
        public static void WriteCompressedUInt32(this IBinaryStreamWriter writer, uint value)
        {
            if (value < 0x80)
                writer.WriteByte((byte)value);
            else if (value < 0x4000)
            {
                writer.WriteByte((byte)(0x80 | value >> 8));
                writer.WriteByte((byte)(value & 0xFF));
            }
            else
            {
                writer.WriteByte((byte)(0x80 | 0x40 | value >> 0x18));
                writer.WriteByte((byte)(value >> 0x10 & 0xFF));
                writer.WriteByte((byte)(value >> 0x08 & 0xFF));
                writer.WriteByte((byte)(value & 0xFF));
            }
        }