feat: add basic joox support

(cherry picked from commit 699333ca06526d747a7eb4a188e896de81e9f014)
This commit is contained in:
鲁树人
2021-12-19 23:03:46 +00:00
parent 9add76c060
commit 1e7116a3a9
13 changed files with 207 additions and 16 deletions

View File

@@ -0,0 +1,15 @@
export function MergeUint8Array(array: Uint8Array[]): Uint8Array {
let length = 0;
array.forEach((item) => {
length += item.length;
});
let mergedArray = new Uint8Array(length);
let offset = 0;
array.forEach((item) => {
mergedArray.set(item, offset);
offset += item.length;
});
return mergedArray;
}