This commit is contained in:
Joel Wetzell
2026-07-13 14:09:21 -05:00
parent 4bb1e87e03
commit 466228fb4a
62 changed files with 2157 additions and 1851 deletions
+11 -11
View File
@@ -1,20 +1,20 @@
import chunk from '../chunk.js';
export default (trackerChunks: Uint8Array[]) => {
let trackerChunksTotalLength = 0;
let trackerChunksTotalLength = 0;
trackerChunks.forEach((trackerChunk) => {
trackerChunksTotalLength += trackerChunk.length;
});
trackerChunks.forEach((trackerChunk) => {
trackerChunksTotalLength += trackerChunk.length;
});
const trackerChunksBytes = new Uint8Array(trackerChunksTotalLength);
const trackerChunksBytes = new Uint8Array(trackerChunksTotalLength);
let offset = 0;
let offset = 0;
trackerChunks.forEach((trackerChunk) => {
trackerChunksBytes.set(trackerChunk, offset);
offset += trackerChunk.length;
});
trackerChunks.forEach((trackerChunk) => {
trackerChunksBytes.set(trackerChunk, offset);
offset += trackerChunk.length;
});
return chunk(0x0001, trackerChunksBytes, true);
return chunk(0x0001, trackerChunksBytes, true);
};