Use 64-bit VROMFS digest offsets

Read and write the digest table start as a 64-bit field in both codecs.
The truncated offset caused SHA-1 mismatches in large packs such as
ui/images.vromfs.bin and ui/atlases.vromfs.bin.

Type checking passed and the service extracted icons and flags from
the large packs.
This commit is contained in:
N0VAN0M4LY committed 2026-11-25 11:00:48 +08:00
1 parent 8012cf7954
commit cf08034060
2 files changed
+7 -5

No files matched your search

+3 -2
View File
@@ -3,7 +3,8 @@
Layout (every block aligned to 16 bytes):
0x00 names header: u32 offset of the name-offset table, u32 file count
0x10 data header: u32 offset of the data table, u32 file count
0x20 digest header: u64 end, u16 begin (only when names offset == 0x30)
0x20 digest header: u64 end, u64 begin (only when names offset == 0x30; begin
exceeds 16 bits in large packs such as ui/images.vromfs.bin)
name offsets: count x u64, each pointing at a NUL-terminated path
names
data table: count x 16 bytes: u32 offset, u32 size, 8 bytes padding
@@ -25,7 +26,7 @@ NAME_MAP_PATH = "nm"
_NAME_MAP_STORED = b"\xff?nm"
_ALIGN = 16
_PAIR = struct.Struct("<II")
_DIGEST_HEADER = struct.Struct("<QH")
_DIGEST_HEADER = struct.Struct("<QQ")
_DIGEST_SIZE = 20