title: How to read Blob as arraybuffer in react-native?
body: <p>I'm trying to convert Blob data into arraybuffer by using <code>FileReader()</code> but its not working giving me an error saying readAsArrayBuffer() is not implemented. so I search on web and found that this function is not implemented in react-native FileReader yet.
  <a href="https://github.com/facebook/react-native/blob/main/Libraries/Blob/FileReader.js#L83-L85" rel="nofollow noreferrer">react-native-Github</a></p>
  <pre><code>    var fileReader = new FileReader();
      fileReader.onload = function (evt) {
        var buffer = evt.target.result;
        var msgReader = new Utils.MsgToHmtl.MSGReader(buffer);
        var fileData = msgReader.getFileData();
        console.log(fileData);
      }
  
      fileReader.readAsArrayBuffer(file);
  </code></pre>
  <p>I also tried using <code>react-native-fs</code> but it's of no use since I wasn't able to find <code>readAsArrayBuffer()</code> function in that package.
  Is there any other package which will help me fixing this problem ?</p>
  <p>get Blob from base64 String</p>
  <pre><code>const b64toBlob = (b64Data, contentType = '', sliceSize = 512) =&gt; {
      const byteCharacters = atob(b64Data);
      const byteArrays = [];
  
      for (let offset = 0; offset &lt; byteCharacters.length; offset += sliceSize) {
        const slice = byteCharacters.slice(offset, offset + sliceSize);
  
        const byteNumbers = new Array(slice.length);
        for (let i = 0; i &lt; slice.length; i++) {
          byteNumbers[i] = slice.charCodeAt(i);
        }
  
        const byteArray = new Uint8Array(byteNumbers);
        byteArrays.push(byteArray);
      }
  
      const blob = new Blob(byteArrays, { type: contentType });
      return blob;
    }
  </code></pre>
  <p>Thank you for you're help :)</p>