Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Use gzip compression level 6 for Codex package archives (#45039)

Charlie Marsh53c542d944c7
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,