Add UPX compression - 80% binary size reduction

Binary size: 5.1MB → 1.6MB (stripped + UPX --best --lzma)

Changes:
- Updated binary with UPX compression
- Added UPX to GitHub Actions build workflow
- Documented UPX compression in README and BUILD.md
- No functionality loss, no performance penalty
- Decompresses automatically on execution

Benefits:
- Faster downloads
- Less storage/bandwidth usage
- Same performance (decompresses to RAM)
- Fully reversible (upx -d)
This commit is contained in:
Krystie
2026-04-01 04:14:09 -07:00
parent 6205018dd1
commit 9bc2f7be11
4 changed files with 22 additions and 2 deletions
+8 -1
View File
@@ -46,7 +46,7 @@ jobs:
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git build-essential libtool autotools-dev automake pkg-config \
libssl-dev libevent-dev bsdmainutils libboost-all-dev \
libminiupnpc-dev libzmq3-dev tor curl wget
libminiupnpc-dev libzmq3-dev tor curl wget upx-ucl
# Build BerkeleyDB 4.8
cd /tmp
@@ -76,6 +76,13 @@ jobs:
make -f makefile.unix -j\$(nproc) USE_UPNP=1
strip trianglesd
# Compress with UPX (80% size reduction!)
echo '=== Before UPX ==='
ls -lh trianglesd
upx --best --lzma trianglesd
echo '=== After UPX ==='
ls -lh trianglesd
# Copy to workspace
mkdir -p /workspace/bin
cp trianglesd /workspace/bin/