def pack(tup):
    """
    Packs a tuple of 8-bit integers.

    :param tup: Tuple of 8-bit integers.
    :type tup: tuple
    :return: The packed n-bit value, where n is len(tup) * 8.
    :rtype: int
    """
    size = len(tup)
    result = 0
    for i in range(size):
        result = tup[i] << i * 8 | result
    return result
