Optimized stream.js / 9-10x faster DecodeStream_ensureBuffer
This commit is contained in:
parent
8cfd024e48
commit
330b99f428
@ -144,8 +144,8 @@ var DecodeStream = (function DecodeStreamClosure() {
|
||||
size *= 2;
|
||||
}
|
||||
var buffer2 = new Uint8Array(size);
|
||||
for (var i = 0; i < current; ++i) {
|
||||
buffer2[i] = buffer[i];
|
||||
if (buffer) {
|
||||
buffer2.set(buffer);
|
||||
}
|
||||
return (this.buffer = buffer2);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user