indexFromKey

fun indexFromKey(key: Long, shift: Int): Int