SWFProcessing.SWFModeller.ABCDataTypeWriter.WriteUI32 C# (CSharp) Method

WriteUI32() public method

public WriteUI32 ( uint v ) : void
v uint
return void
        public void WriteUI32(uint v)
        {
            if (v < 128U)
            {
                this.WriteUI8(v);
            }
            else if (v < 16384U)
            {
                this.WriteUI8((v & 127) | 128);
                this.WriteUI8((v >> 7) & 127);
            }
            else if (v < 2097152U)
            {
                this.WriteUI8((v & 127) | 128);
                this.WriteUI8((v >> 7) | 128);
                this.WriteUI8((v >> 14) & 127);
            }
            else if (v < 268435456U)
            {
                this.WriteUI8((v & 127) | 128);
                this.WriteUI8((v >> 7) | 128);
                this.WriteUI8((v >> 14) | 128);
                this.WriteUI8((v >> 21) & 127);
            }
            else
            {
                this.WriteUI8((v & 127) | 128);
                this.WriteUI8((v >> 7) | 128);
                this.WriteUI8((v >> 14) | 128);
                this.WriteUI8((v >> 21) | 128);
                this.WriteUI8((v >> 28) & 15);
            }
        }