Uploads are gzipped (call() sets Content-Encoding: gzip), but downloads never ask for compression. getContent() sends no Accept-Encoding, so text-heavy files come down uncompressed.
node-fetch will negotiate and inflate gzip/deflate automatically when compress is left at its default, so this may be as small as confirming the header is actually being sent and that the API honours it.
Note the deliberate exception: getRange() sets compress: false on purpose — byte ranges are only meaningful on the identity representation. That must stay as it is.
README TODO: "Support gzip/deflate encoding for downloads".
Uploads are gzipped (
call()setsContent-Encoding: gzip), but downloads never ask for compression.getContent()sends noAccept-Encoding, so text-heavy files come down uncompressed.node-fetchwill negotiate and inflate gzip/deflate automatically whencompressis left at its default, so this may be as small as confirming the header is actually being sent and that the API honours it.Note the deliberate exception:
getRange()setscompress: falseon purpose — byte ranges are only meaningful on the identity representation. That must stay as it is.README TODO: "Support gzip/deflate encoding for downloads".