port client compression from the Perl Seco::Data::Range version