Decompress the provided file using the appropriate library
        :param databasepath: Name and path of where the database files are to be downloaded
        :param database_name: Name of the database e.g. sipprverse
        :param compression: STR MOB-suite databases are .zip files, while OLC databases are .tar.gz
        :param compressed_file: Compressed file to process

def decompress(databasepath, database_name, compression, compressed_file):
        """
        Decompress the provided file using the appropriate library
        :param databasepath: Name and path of where the database files are to be downloaded
        :param database_name: Name of the database e.g. sipprverse
        :param compression: STR MOB-suite databases are .zip files, while OLC databases are .tar.gz
        :param compressed_file: Compressed file to process
        """
        # Extract the databases from the archives
        if os.path.isfile(compressed_file):
            if compression == 'tar':
                logging.info('Extracting {dbname} from archives'.format(dbname=database_name))
                with tarfile.open(compressed_file, 'r') as tar:
                    # Decompress the archive
                    tar.extractall(path=databasepath)
            elif compression == 'gz':
                with gzip.open(compressed_file, 'rb') as gz:
                    file_name = os.path.basename(os.path.splitext(compressed_file)[0])
                    output_file = os.path.join(databasepath,
                                               database_name,
                                               file_name)
                    logging.info('Extracting {file_name} from archives'.format(file_name=file_name))
                    with open(output_file, 'wb') as output:
                        shutil.copyfileobj(gz, output)
            else:
                logging.info('Extracting {dbname} from archives'.format(dbname=database_name))
                with zipfile.ZipFile(compressed_file, 'r') as zip_file:
                    zip_file.extractall(path=databasepath)
            # Delete the archive file
            os.remove(compressed_file)