Honor explicit NUP compression for .zs members #456
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!456
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/nup-explicit-codec"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this fixes
Extracting a NUP can silently corrupt
.zstextures while producing files of the expected size. This happens when the package compresses a member whose decoded payload is not another Zstd frame.Why merge
Change
nx2/nup.py: read the codec byte, use it to select package decompression and enforce its stored extent.nx2/test_nup_codec.py: check compressed.zsplaintext, raw game Zstd, legacy detection and a truncated extent.Tested
python -I -B nx2/test_nup_codec.pyexercises the actual constructor and copy routine using synthetic packages.Not covered
No game data is included.