def zip(self, destination: typing.Union[str, Path] = None, encode: bool = True) -> str:
if encode:<EOL><INDENT>self._encode()<EOL><DEDENT>if destination is None:<EOL><INDENT>destination_path = self.miz_path.parent.joinpath(f'<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>destination_path = elib.path.ensure_file(destination, must_exist=False)<EOL><DEDENT>LOGGER.debug('<STR_LIT>', destination_path)<EOL>destination_path.write_bytes(dummy_miz)<EOL>with ZipFile(str(destination_path), mode='<STR_LIT:w>', compression=<NUM_LIT:8>) as zip_file:<EOL><INDENT>for root, _, items in os.walk(self.temp_dir.absolute()):<EOL><INDENT>for item in items:<EOL><INDENT>item_abs_path = Path(root, item).absolute()<EOL>item_rel_path = Path(item_abs_path).relative_to(self.temp_dir)<EOL>zip_file.write(item_abs_path, arcname=item_rel_path)<EOL><DEDENT><DEDENT><DEDENT>return str(destination_path)<EOL>
Write mission, dictionary etc. to a MIZ file

Args:
    destination: target MIZ file (if none, defaults to source MIZ + "_EMIZ"

Returns: destination file