title: Uncaught incorrect header check using pako.js
body: <pre><code>function loadFileAsBinary()
  {
      var fileToLoad = document.getElementById("fileToLoad").files[0];
  
      var fileReader = new FileReader();
  
      fileReader.onload = function(fileLoadedEvent) 
      {
          var textFromFileLoaded = fileLoadedEvent.target.result;
  
          var rs       = textFromFileLoaded;
  
          var charData = rs.split('').map(function(x){return x.charCodeAt(0);}); 
          console.log(charData);
  
          var bindata  = new Uint8Array(charData);
          console.log(bindata);
  
          var plain    = pako.inflate(bindata, {to: 'string' });
  
          var strData  = String.fromCharCode.apply(null, new Uint16Array(plain));
  
          document.getElementById("inputTextToSave").value = strData;
  
      };
  
      fileReader.readAsBinaryString(fileToLoad);
  }
  </code></pre>
  
  <p>I want to inflate upload file but this function gives an error:</p>
  
  <blockquote>
    <p>Uncaught incorrect header check</p>
  </blockquote>