src/fetch.js
function decompressStream(stream, headers) {
  const transferEncoding  = headers.get('Transfer-Encoding');
  const contentEncoding   = headers.get('Content-Encoding');
  if (contentEncoding === 'deflate' || transferEncoding === 'deflate')
    return stream.pipe( Zlib.createInflate() );
  if (contentEncoding === 'gzip' || transferEncoding === 'gzip')
    return stream.pipe( Zlib.createGunzip() );
  return stream;
}
function decompressStream(stream, headers) {
  const transferEncoding  = headers.get('Transfer-Encoding');
  const contentEncoding   = headers.get('Content-Encoding');
  if (contentEncoding === 'deflate' || transferEncoding === 'deflate')
    return stream.pipe( Zlib.createInflate() );
  if (contentEncoding === 'gzip' || transferEncoding === 'gzip')
    return stream.pipe( Zlib.createGunzip() );
  return stream;
}
function decompressStream ( stream , headers ) { const transferEncoding = headers . get ( 'Transfer-Encoding' ) ; const contentEncoding = headers . get ( 'Content-Encoding' ) ; if ( contentEncoding === 'deflate' || transferEncoding === 'deflate' ) return stream . pipe ( Zlib . createInflate ( ) ) ; if ( contentEncoding === 'gzip' || transferEncoding === 'gzip' ) return stream . pipe ( Zlib . createGunzip ( ) ) ; return stream ; }
Decompress stream based on content and transfer encoding headers.
Decompress stream based on content and transfer encoding headers .