(buf: Uint8Array)
| 14 | return out; |
| 15 | } |
| 16 | function decodeUtf16LE(buf: Uint8Array): string { |
| 17 | let s = ""; |
| 18 | const len = buf.length & ~1; // even length |
| 19 | for (let i = 0; i < len; i += 2) { |
| 20 | s += String.fromCharCode(buf[i] | (buf[i + 1] << 8)); |
| 21 | } |
| 22 | return s; |
| 23 | } |
| 24 | |
| 25 | const ROOT = "/"; |
| 26 | function norm(p: string): string { |