def get_byte_as_int(encoded: bytearray, idx: int) -> tuple:
    """
    Returns a byte value as int and next to be read index
    :param encoded: bytearray
    :param idx: index to lookup
    :return: tuple of byte read and next index
    """
    return encoded[idx], idx + 1