From 4f50d277dabb983edc3a5df91d3decb6adfec1af Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 19 Dec 2023 11:23:53 -0600 Subject: [PATCH] enable standard zip ("deflate") compression This saves ~50% on the main bundle and will save ~85% on the fonts bundle --- circuitpython_build_tools/scripts/build_bundles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circuitpython_build_tools/scripts/build_bundles.py b/circuitpython_build_tools/scripts/build_bundles.py index 6fa472a..e85610e 100755 --- a/circuitpython_build_tools/scripts/build_bundles.py +++ b/circuitpython_build_tools/scripts/build_bundles.py @@ -205,7 +205,7 @@ def build_bundle(libs, bundle_version, output_filename, package_folder_prefix, print() print("Zipping") - with zipfile.ZipFile(output_filename, 'w') as bundle: + with zipfile.ZipFile(output_filename, 'w', compression=zipfile.ZIP_DEFLATED) as bundle: build_metadata = {"build-tools-version": build_tools_version} bundle.comment = json.dumps(build_metadata).encode("utf-8") if multiple_libs: