Fixes #4791: Use gzip to compress inventories if possible before transfer