The patch below is a followup to the thread started in December:
It provides a naïve but apparently good enough way for ‘guix substitute’
to choose the compression method that yields the best speed given the
CPU and current networking conditions.
On a recent x86_64 laptop with fast networking, using ci.guix.gnu.org,
the effect so far is to choose gzip substitutes, which indeed provides
slightly faster substitute installation. When ci.guix provides zstd
substitutes, the speedup will be higher.
I have yet to check that it sticks to lzip when bandwidth is low.