internal static void CheckSliceOutOfBounds(int index, int length, IByteBuffer buffer)
 {
     if (MathUtil.IsOutOfBounds(index, length, buffer.Capacity))
     {
         ThrowHelper.ThrowIndexOutOfRangeException_CheckSliceOutOfBounds(index, length, buffer);
     }
 }