Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repacking nsp->nsz->nsp #116

Closed
64ghost opened this issue Sep 6, 2022 · 2 comments · Fixed by #131
Closed

Repacking nsp->nsz->nsp #116

64ghost opened this issue Sep 6, 2022 · 2 comments · Fixed by #131
Assignees
Labels
enhancement New feature or request file format Issues with the NSZ file format
Milestone

Comments

@64ghost
Copy link

64ghost commented Sep 6, 2022

After translating nsp->nsz and back nsz->nsp. The resulting nsp is larger. The reason is that the data starts at address 0x8000. Up to address 0x8000 filled with zeros. Is it possible to reduce the void to a minimum.

@blawar
Copy link
Collaborator

blawar commented Sep 6, 2022

edit: you are talking about the NSP padding. The NSP padding exists to allow operations on existing NSP containers (such as adding and deleting files. This space is small (less than 32kb). You could repack the NSP with a different tool if you really wanted to reclaim less than 32kb of space.

@nicoboss nicoboss added this to the v4.3 milestone Apr 11, 2023
@nicoboss nicoboss self-assigned this Apr 11, 2023
@nicoboss nicoboss added enhancement New feature or request file format Issues with the NSZ file format labels Apr 11, 2023
@nicoboss
Copy link
Owner

nicoboss commented Jul 7, 2023

@64ghost This is fixed in the latest NSZ v4.3.0 release. The padding of the source NSP is now kept during compression/decompression making them always bit-identical (especially if --keep-delta is specified). The option --remove-padding was added to remove the padding of existing NSP/NSZ files to make them nxdumptool/no-intro compliant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request file format Issues with the NSZ file format
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants