bazelbuild / bazelbuild/bazelisk
Add UPX compression (or similar) to release artifacts
- 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

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
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