typed arrays - How can I merge TypedArrays in JavaScript? -


i'd merge multiple arraybuffers create blob. however, know, typedarray dosen't have "push" or useful methods...

e.g.:

var = new int8array( [ 1, 2, 3 ] ); var b = new int8array( [ 4, 5, 6 ] ); 

as result, i'd [ 1, 2, 3, 4, 5, 6 ].

use set method. note, need twice memory!

var = new int8array( [ 1, 2, 3 ] ); var b = new int8array( [ 4, 5, 6 ] );  var c = new int8array(a.length + b.length); c.set(a); c.set(b, a.length);  console.log(a); console.log(b); console.log(c); 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -