bazelbuild / bazelbuild/bazelisk

Add UPX compression (or similar) to release artifacts

Open
#210 0 comments 0 reactions 0 assignees View on GitHub
P2 type: feature request
Dominant language
Go
Stars
2.7k
Forks
424
PR merge metrics
No merged PRs in 30d

Description

If bazelisk is going to be comitted to source control, it could be beneficial to utilise upx compression on the release binaries in order to minimise their size. Especially if these executables are to be updated with new versions, this will reduce the size taken in the revision history. Of course, you could just use git LFS, but for just a single binary?

In testing, I found that the windows executable gets a ~50% compression ratio, and the linux amd/arm releases get about 35%.

Particularly the windows executable being 6.9 MB uncompressed.

https://github.com/upx/upx

![image](https://user-images.githubusercontent.com/8946502/105927191-9c16cc00-6097-11eb-968d-e9101deafa4f.png)

The only caveat with this is that some viruses are packed using UPX, and the UPX header is sometimes a false positive for anti virus. UPX isn't the only binary packer out there though.

Contributor guide

Open the contributing guide

Research direction

Review the release-artifact build and publishing entry points, then evaluate UPX or a similar packer against the reported Windows and Linux size reductions. Confirm that compressed artifacts are usable and that the antivirus false-positive concern is acceptable; done means the release binaries are consistently compressed without breaking distribution.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.