javascript - Resize ArrayBuffer -


if want create arraybuffer, write: var buff = new arraybuffer(size)

but how possible resize existing buffer? mean, adding more bytes @ end of buffer.

var buf = new arraybuffer(32); buf[31] = 43; var buff = new arraybuffer(buf.bytelength*2);  (var i=0;i<buf.bytelength;i++){     buff[i] = buf[i]; }  buf = buff; 

i've done in c++ this. made bigger array , copy contents on , return larger array , set original.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -