From 53c542d944c705f3a66780a19223223bee57cbb6 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sat, 12 Sep 2026 12:57:12 +0000 Subject: [PATCH] Use gzip compression level 6 for Codex package archives (#45039) GitOrigin-RevId: ffd0d1cedb56a10dd9e2e0410c60deafc4202f37 --- scripts/codex_package/archive.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/codex_package/archive.py b/scripts/codex_package/archive.py index 7e6a3f8465..85123cc01e 100644 --- a/scripts/codex_package/archive.py +++ b/scripts/codex_package/archive.py @@ -59,7 +59,8 @@ def archive_format_for_path(path: Path) -> str: def write_tar_archive(package_dir: Path, archive_path: Path, *, mode: str) -> None: - with tarfile.open(archive_path, mode) as archive: + options = {"compresslevel": 6} if mode == "w:gz" else {} + with tarfile.open(archive_path, mode, **options) as archive: for path in package_entries(package_dir): archive.add( path,