src/AnvilPacker/Data/IO/BitReader.cs
/// <summary> Reads <paramref name="count"/> bits from the stream. </summary>
/// <param name="count">Number of bits to read. Must be between 0 and 32 (inclusive) </param>
Reads  bits from the stream.
Reads bits from the stream .
public int ReadBits(int count)
        {
            Debug.Assert(count is >= 1 and <= 32);
            if (_pos + count > _len) { 
                Fetch(count);
            }
            ulong val = PeekChecked(count);
            _pos += count;
            return (int)val;
        }
public int ReadBits ( int count ) { Debug . Assert ( count is >= 1 and <= 32 ) ; if ( _pos + count > _len ) { Fetch ( count ) ; } ulong val = PeekChecked ( count ) ; _pos += count ; return ( int ) val ; }
Reads  bits from the stream.
Reads bits from the stream .
//TODO: is this branch problematic? (instruction cache or whatever)
count
int
Number of bits to read. Must be between 0 and 32 (inclusive)
Number of bits to read . Must be between 0 and 32 ( inclusive )