from typing import Iterable


def int_to_indices(value: int, length: int, radix_bits: int) -> Iterable[int]:
    """Convert an integer value to indices in big endian order."""
    mask = (1 << radix_bits) - 1
    return ((value >> (i * radix_bits)) & mask for i in reversed(range(length)))