src/AnvilPacker/Data/BitArrays/PackedBitStorage.cs
/// <summary> Gets the element at the specified index. </summary>
Gets the element at the specified index.
Gets the element at the specified index .
public int Get(int index)
        {
            Ensure.IndexValid(index, Count);
            int bitPos = index * BitsPerElement;
            int bytePos = bitPos >> 3;
            int shift = bitPos & 7;
            ulong v = ReadLE(Data, bytePos);
            return (int)((v >> shift) & mask);
        }
public int Get ( int index ) { Ensure . IndexValid ( index , Count ) ; int bitPos = index * BitsPerElement ; int bytePos = bitPos >> 3 ; int shift = bitPos & 7 ; ulong v = ReadLE ( Data , bytePos ) ; return ( int ) ( ( v >> shift ) & mask ) ; }
Gets the element at the specified index.
Gets the element at the specified index .
index
int