function copy(src) { var dst = new ArrayBuffer(src.byteLength); new Uint8Array(dst).set(new Uint8Array(src)); return dst; }