def METHOD_NAME(pack: Union[ResourcePack, DataPack]) -> JsonDict:
    fileobj = io.BytesIO()
    with zipfile.ZipFile(fileobj, mode="w") as output:
        pack.dump(output)
    return {"zip": base64.b64encode(fileobj.getvalue()).decode()}