(parts: readonly Uint8Array[])
| 62 | }))(); |
| 63 | |
| 64 | const concat = (parts: readonly Uint8Array[]): Uint8Array => { |
| 65 | const out = new Uint8Array(parts.reduce((sum, part) => sum + part.length, 0)); |
| 66 | let offset = 0; |
| 67 | for (const part of parts) { |
| 68 | out.set(part, offset); |
| 69 | offset += part.length; |
| 70 | } |
| 71 | return out; |
| 72 | }; |
| 73 | |
| 74 | const advertisement = (sha: string): Uint8Array => |
| 75 | concat([ |
no test coverage detected