| 1296 | // Global records apply to every entry that follows, except the ones that only |
| 1297 | // describe a single entry, and an empty value removes a record |
| 1298 | private addGlobal(records: Map<string, string>): void { |
| 1299 | for (const [key, value] of records) { |
| 1300 | if (key === "path" || key === "linkpath" || key === "size") continue |
| 1301 | if (value !== "") (this.global ??= new Map()).set(key, value) |
| 1302 | else this.global?.delete(key) |
| 1303 | } |
| 1304 | if (this.global?.size === 0) this.global = undefined |
| 1305 | } |
| 1306 | |
| 1307 | private toHeader(raw: RawHeader): Header { |
| 1308 | // The records of the entry's own extended header override global ones |