title: How to convert gzip encoded response into base64 string
body: <p>I have an ajax response receiving as Content-Encoding as gzip.</p>
  
  <p>I would like to convert it into base64 encoded string.</p>
  
  <p><img src="https://i.stack.imgur.com/3YSrs.png" alt="enter image description here"></p>
  
  <p>In firefox/firebug Net tab I can open response and see in base64 encoded text.</p>
  
  <p><img src="https://i.stack.imgur.com/12rEi.png" alt="enter image description here"></p>
  
  <p>As you can see below, firebug can convert response into base64 string.
  I can save this file as abc.zip and unzip successfully.
  How can I achieve it in JavaScript? (Converting ajax response into base64 string)</p>
  
  <p><img src="https://i.stack.imgur.com/CQxEK.png" alt="enter image description here"></p>