bzip2 is obsolete, please consider using xz instead
Linux binaries are currently distributed in the bzip2 format, which has been obsolete for many years. E.g. the Linux kernel discontinued its use back in 2013.
bzip2's decompression speed is really bad (regardless of compression level chosen): (Source)
Meanwhile, xz -2
produces a smaller file than bzip -9
(the maximum) in less time:
% tar c build/Linux/release-v0.14/release/bin | time bzip2 -9 | dd of=/dev/null
57019+1 records in
57019+1 records out
29194204 bytes (29 MB, 28 MiB) copied, 10.0992 s, 2.9 MB/s
bzip2 -9 10.06s user 0.04s system 99% cpu 10.102 total
% tar c build/Linux/release-v0.14/release/bin | time xz -2 | dd of=/dev/null
50121+1 records in
50121+1 records out
25662068 bytes (26 MB, 24 MiB) copied, 9.36288 s, 2.7 MB/s
xz -2 9.27s user 0.08s system 99% cpu 9.365 total
xz -9
takes longer, but produces a file less than half that size:
% tar c build/Linux/release-v0.14/release/bin | time xz -9 | dd of=/dev/null
20480+1 records in
20480+1 records out
10486008 bytes (10 MB, 10 MiB) copied, 34.8597 s, 301 kB/s
xz -9 34.54s user 0.34s system 99% cpu 34.892 total