src/AnvilPacker/Data/BitArrays/NibbleArray.cs
/// <summary> Writes a nibble to the array at the specified position. </summary>
Writes a nibble to the array at the specified position.
Writes a nibble to the array at the specified position .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static void Set(byte[] data, int index, int value)
        {
            ref byte b = ref data[index >> 1];
            int s = (index & 1) * 4;
            int m = 0xF0 >> s;
            b = (byte)((b & m) | (value & 15) << s);
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static void Set ( byte [ ] data , int index , int value ) { ref byte b = ref data [ index >> 1 ] ; int s = ( index & 1 ) * 4 ; int m = 0xF0 >> s ; b = ( byte ) ( ( b & m ) | ( value & 15 ) << s ) ; }
Writes a nibble to the array at the specified position.
Writes a nibble to the array at the specified position .
data
byte[]
index
int
value
int