title: How to cast an Int32Array to a Uint8Array without copying
body: <p>I have an object of type <code>Int32Array</code> of length <code>1</code> and I would like to cast it to an object of type <code>Uint8Array</code> of length <code>4</code>, preferably without copying the memory content. How can I do this?</p>
  <p><strong>[UPDATE]</strong></p>
  <p>To explain my problem better, consider the following code:</p>
  <pre><code>const view = new DataView(int32array.buffer);
  const uni8array = new Uint8Array(int32array.length * 4);
  for (let i=0; i&lt;int32array.length; i++) {
      uni8array[i*4+0] = view.getUint8(i*4+0);
      uni8array[i*4+1] = view.getUint8(i*4+1);
      uni8array[i*4+2] = view.getUint8(i*4+2);
      uni8array[i*4+3] = view.getUint8(i*4+3);
  }
  </code></pre>
  <p>This code does exactly what I want to do but it copies the original array into a new one. I was hoping there's a way to do the same without copying the memory.</p>