Skip to content

Commit 72c3962

Browse files
dbg
1 parent f99eb20 commit 72c3962

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/src/services/FirmwareService.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export class FirmwareService {
2929
}
3030

3131
private async unzipStreamToVariable(stream: ReadableStream<Uint8Array>): Promise<{ [filename: string]: Uint8Array }> {
32+
print("In unzipStreamToVariable method.");
3233
const reader = stream.getReader();
3334
let chunks = [];
3435
while (true) {
@@ -38,11 +39,14 @@ export class FirmwareService {
3839
}
3940
chunks.push(value);
4041
}
42+
4143
const allChunks = new Uint8Array(chunks.flatMap(chunk => [...chunk]));
44+
console.log('All chunks:', allChunks);
4245
const { entries } = await unzip(allChunks);
4346

4447
const unzippedData: { [filename: string]: Uint8Array } = {};
4548
for (const entry of Object.values(entries) as { name: string; arrayBuffer: () => Promise<ArrayBuffer> }[]) {
49+
console.log('Entry:', entry.name);
4650
const arrayBuffer = await entry.arrayBuffer();
4751
unzippedData[entry.name] = new Uint8Array(arrayBuffer);
4852
}

0 commit comments

Comments
 (0)