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

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -