fix(apple): preserve archive signatures and metadata byte identity

This commit is contained in:
morluto
2026-10-13 07:34:52 +08:00
parent 653067d799
commit dc038d16bb
12 changed files with 82 additions and 28 deletions
+2 -1
View File
@@ -260,7 +260,8 @@ const collectSegment = (
state.sections.push({
name: bytes
.subarray(position, position + 16)
.toString("ascii")
// ASCII decoding masks high bits and can fabricate known metadata names.
.toString("latin1")
.replace(/\0.*$/u, ""),
address: bytes.readBigUInt64LE(position + 32),
size: Number(sectionSize),