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
Post a Comment