src/AnvilPacker/Data/BitArrays/NibbleArray.cs
/// <summary> Reads a nibble from the array at the specified position. </summary>
Reads a nibble from the array at the specified position.
Reads a nibble from the array at the specified position .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static int Get(byte[] data, int index)
        {
            byte b = data[index >> 1];
            int s = (index & 1) * 4;
            return (b >> s) & 15;
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static int Get ( byte [ ] data , int index ) { byte b = data [ index >> 1 ] ; int s = ( index & 1 ) * 4 ; return ( b >> s ) & 15 ; }
Reads a nibble from the array at the specified position.
Reads a nibble from the array at the specified position .
//byte b = arr[idx / 2]; //return i % 2 == 0 ? b & 15 : b >> 4;
data
byte[]
index
int