-
我使用.“WinRAR”. 文件情况
解压方式
问题
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
if using ArrayBuffer.slice class Uint8ArrayReader{ 统一化所有截取值都是"ArrayBuffer" |
Beta Was this translation helpful? Give feedback.
-
使用了 class Uint8ArrayWriter extends Writer {
chunks = [];
writeUint8Array(array) {
super.writeUint8Array(array);
this.chunks.push(array);
}
getData() {
const { chunks } = this;
let size = 0;
for (const chunk of chunks) {
size += chunk.length;
}
const array = new Uint8Array(size);
let offset = 0;
for (const chunk of chunks) {
array.set(chunk, offset);
offset += chunk.length;
}
return array;
}
} |
Beta Was this translation helpful? Give feedback.
-
class Uint8ArrayWriter extends Writer {
constructor() {
super();
this.array = [];
}
writeUint8Array(array) {
super.writeUint8Array(array);this.array.push(e);
}
async getData() {
return new Uint8Array(await new Blob(this.array).arrayBuffer())
}
} |
Beta Was this translation helpful? Give feedback.
-
Thank you, it's fixed in the version 2.6.14 I just published. |
Beta Was this translation helpful? Give feedback.
使用了
Uint8ArrayWriter
吗?如果是,那么换成下面的实现或者BlobWriter
之后,情况有所改善吗?