(body: import('node:stream/web').ReadableStream)
| 100 | } |
| 101 | |
| 102 | async function decompressGzip(body: import('node:stream/web').ReadableStream): Promise<Buffer> { |
| 103 | const gunzip = createGunzip() |
| 104 | const nodeStream = Readable.fromWeb(body) |
| 105 | const chunks: Buffer[] = [] |
| 106 | |
| 107 | return new Promise<Buffer>((resolve, reject) => { |
| 108 | nodeStream.on('error', reject) |
| 109 | nodeStream |
| 110 | .pipe(gunzip) |
| 111 | .on('data', (chunk: Buffer) => chunks.push(chunk)) |
| 112 | .on('end', () => resolve(Buffer.concat(chunks))) |
| 113 | .on('error', reject) |
| 114 | }) |
| 115 | } |
| 116 | |
| 117 | interface TarEntry { |
| 118 | name: string |
no test coverage detected