SevenZip.Compression.RangeCoder.Decoder.DecodeBit C# (CSharp) Method

DecodeBit() public method

public DecodeBit ( uint size0, int numTotalBits ) : uint
size0 uint
numTotalBits int
return uint
        public uint DecodeBit(uint size0, int numTotalBits)
        {
            uint newBound = (Range >> numTotalBits) * size0;
            uint symbol;
            if (Code < newBound)
            {
                symbol = 0;
                Range = newBound;
            }
            else
            {
                symbol = 1;
                Code -= newBound;
                Range -= newBound;
            }
            Normalize();
            return symbol;
        }