def METHOD_NAME(self, archive_file: str, data: bytes) -> bool:
    # At the moment, no other option but to rebuild the whole
    # zip archive w/o the indicated file. Very sucky, but maybe
    # another solution can be found
    files = self.get_filename_list()
    if archive_file in files:
        if not self.rebuild([archive_file]):
            return False
    try:
        # now just add the archive file as a new one
        with zipfile.ZipFile(self.path, mode="a", allowZip64=True, compression=zipfile.ZIP_DEFLATED) as zf:
            zf.writestr(archive_file, data)
        return True
    except (zipfile.BadZipfile, OSError) as e:
        logger.error("Error writing zip archive [%s]: %s :: %s", e, self.path, archive_file)
        return False