Alexandria.Compression.BitStream.ReadMSB C# (CSharp) Method

ReadMSB() public method

Read some bits in MSB order.
public ReadMSB ( int count ) : int
count int
return int
        public int ReadMSB(int count)
        {
            if (BitCount < count)
                FetchMSB();

            int result = (int)((Bits >> (32 - count)) & ~((~0) << count));
            Bits <<= count;
            BitCount -= count;
            return result;
        }