def bin2asc(data: bytes):
    """ Encode binary data as ascii. If it is a large data set, then use a
        list of hex characters.
    """
    if len(data) > 30:
        res = []
        for part in chunks(data):
            res.append(binascii.hexlify(part).decode("ascii"))
        return res
    else:
        return binascii.hexlify(data).decode("ascii")