feat: add basic joox support
This commit is contained in:
15
src/utils/MergeUint8Array.ts
Normal file
15
src/utils/MergeUint8Array.ts
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user