(key: string, value: string)
| 737 | } |
| 738 | |
| 739 | const paxRecord = (key: string, value: string): Uint8Array => { |
| 740 | const rest = textEncoder.encode(` ${key}=${value}\n`) |
| 741 | // The length counts its own digits |
| 742 | const length = rest.length + String(rest.length + String(rest.length).length).length |
| 743 | const out = new Uint8Array(length) |
| 744 | writeString(out, 0, length, String(length)) |
| 745 | out.set(rest, length - rest.length) |
| 746 | return out |
| 747 | } |
| 748 | |
| 749 | const paxHeaderName = (path: string): string => { |
| 750 | const trimmed = path.replace(/\/+$/, "") |
no test coverage detected