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

WriteU30Packed() public method

public WriteU30Packed ( uint v ) : void
v uint
return void
        public void WriteU30Packed(uint v)
        {
            this.Align8();
            this.WriteUBits(v, 7);
            v >>= 7;
            if (v == 0)
            {
                this.WriteBit(false);
                return;
            }

            this.WriteBit(true);

            this.WriteUBits(v, 7);
            v >>= 7;
            if (v == 0)
            {
                this.WriteBit(false);
                return;
            }

            this.WriteBit(true);

            this.WriteUBits(v, 7);
            v >>= 7;
            if (v == 0)
            {
                this.WriteBit(false);
                return;
            }

            this.WriteBit(true);

            this.WriteUBits(v, 7);
            v >>= 7;
            if (v == 0)
            {
                this.WriteBit(false);
                return;
            }

            this.WriteBit(true);

            if (v > 3)
            {
                throw new SWFModellerException(
                        SWFModellerError.Internal,
                        "Can't write a 32-bit value into a U30 field");
            }

            this.WriteUI8(v);
        }