import pickle


def read_all(filename):
    """Read all data from a pickle file.

    Args:
        filename: The filename to the pickle file.

    Return:
        data_list: List of elements.
    """
    data_list = []

    with open(filename, 'rb') as f:
        while True:
            try:
                data = pickle.load(f)
                data_list.append(data)
            except EOFError:
                break

    return data_list