src/AnvilPacker/Data/BitArrays/SparseBitStorage.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 dataIndex = index / valuesPerLong;
            int shift = (index - dataIndex * valuesPerLong) * BitsPerElement;
            ref long v = ref Mem.GetRef(Data, dataIndex);
            return (int)((v >> shift) & mask);
        }
public int Get ( int index ) { Ensure . IndexValid ( index , Count ) ; int dataIndex = index / valuesPerLong ; int shift = ( index - dataIndex * valuesPerLong ) * BitsPerElement ; ref long v = ref Mem . GetRef ( Data , dataIndex ) ; return ( int ) ( ( v >> shift ) & mask ) ; }
Gets the element at the specified index.
Gets the element at the specified index .
index
int