Compress complete Linux runtime archives across large decoder binaries

This commit is contained in:
karl committed 2026-10-13 21:53:37 +02:00
1 parent 47d25e0d5c
commit 427878d11c
2 files changed
+12 -1

No files matched your search

+9
View File
@@ -128,3 +128,12 @@ Ignored raw evidence is in `speech-auto-61afa08/relocated-verification.json` and
`relocated-native-cpu.log` under the WSL validation cache. `relocated-native-cpu.log` under the WSL validation cache.
Linux GPU execution, shared-service packaged speech/Google retrieval and public Linux GPU execution, shared-service packaged speech/Google retrieval and public
archive delivery remain open. Archive construction is now underway. archive delivery remain open. Archive construction is now underway.
The first complete archive passed all 60 extracted file/permission records and
both installed-layout self-tests, but at 109314948 bytes it exceeds Gitea's
100-MiB upload limit. SHA-256:
`9ae7fa9a203c6471cfd6bdd82ac5bf81683813c15fe652595976344fbbf96084`.
It is retained as an unpublished candidate. XZ packaging now uses a 64-MiB
dictionary (preset 9) to compress duplicate decoder/runtime code across large
ELF files; client decompression needs roughly 65 MiB. All 21 package tests
passed after this compression change. No runtime files are removed.
+3 -1
View File
@@ -221,7 +221,9 @@ def package(root, executable, runtime, media, output, llama_license=None, compre
temporary_path = Path(temporary.name) temporary_path = Path(temporary.name)
try: try:
records = [] records = []
with temporary_path.open("wb") as raw, (lzma.LZMAFile(raw, "w", preset=6) if compression == "xz" else gzip.GzipFile(filename="", mode="wb", fileobj=raw, mtime=0)) as compressed, tarfile.open(fileobj=compressed, mode="w|") as archive: # A 64-MiB dictionary retains duplicated decoder/runtime code across
# large ELF files. Decompression needs roughly 65 MiB on the client.
with temporary_path.open("wb") as raw, (lzma.LZMAFile(raw, "w", preset=9) if compression == "xz" else gzip.GzipFile(filename="", mode="wb", fileobj=raw, mtime=0)) as compressed, tarfile.open(fileobj=compressed, mode="w|") as archive:
for name, (path, expected_record) in sorted(selected.items()): for name, (path, expected_record) in sorted(selected.items()):
safe_name(name) safe_name(name)
regular(path, path.parent) regular(path, path.parent)