decompress-binary
Installation
SKILL.md
Decompress a ClickHouse Binary (Cross-Architecture)
ClickHouse release and CI clickhouse binaries are self-extracting: a small
decompressor stub, followed by the zstd-compressed real ELF and a trailer.
The normal way to decompress is to run the binary once: it extracts the inner
ELF in place and re-execs it. That works on the binary's own architecture,
and also on a foreign architecture if qemu user-mode emulation for it is
installed (e.g. qemu-aarch64 to run an aarch64 binary on x86). When qemu for
the target is not available, you cannot run the binary at all and must extract the
payload offline.
This skill extracts the inner ELF without executing anything, on any host.