import pickle


def load_pickle(file, decompress=True):
    """
    Load a .pickle file.
    :param file: file .pickle to load.
    :param decompress: the compress or not the file
    :return: loaded data.
    """
    with open(file, "rb") as f:
        if decompress:
            data = pickle.load(f)
        else:
            data = f.read()
    return data