title: Javascript Fetch API with multiple ranges request get binary Float32Array data
body: <p>I am using range request to read many 32 bit float from a large binary file, unfortunately the float I need from this file is at different part of the file, hence I need to do range request with multiple ranges</p>
  
  <pre><code>fetch("http://example.com/largeBinaryFile.bin", {
          headers: {
              'content-type': 'multipart/byteranges',
              'range': 'bytes=2-5,10-13',
          },
      })
      .then(response =&gt; {
          if (response.ok) {
              return response.text();
          }
      })
      .then(response =&gt; {
          console.log(response);
      });
  </code></pre>
  
  <p>Because of the multiple ranges, I have to use text instead of arrayBuffer, and when I print out the response I get</p>
  
  <pre><code>--00000000000000000002
  Content-Type: application/octet-stream
  Content-Range: bytes 2-5/508687874
  
  1È¹C
  --00000000000000000002
  Content-Type: application/octet-stream
  Content-Range: bytes 10-13/508687874
  
  þC
  --00000000000000000002--
  </code></pre>
  
  <p>As you can see, the binary data are in different parts, I have tried using Blob and FileReader to turn the data into arrayBuffer and wrap it with Float32Array but with no success. May I ask how do I get the 32 bit float value from the multiparts? Thank you so much in advance for your help.</p>