def console_save_xp(
    con: tcod.console.Console, filename: str, compress_level: int = 9
) -> bool:
    """Save a console to a REXPaint `.xp` file."""
    return bool(
        lib.TCOD_console_save_xp(
            _console(con), filename.encode("utf-8"), compress_level
        )
    )
Save a console to a REXPaint `.xp` file.