Homebrew RELEASE NSZ Title Compression Results

  • Thread starter Thread starter blawar
  • Start date Start date
  • Views Views 47,809
  • Replies Replies 116
  • Likes Likes 33
Is there an easy way to script this in Windows? For now I've just been using the NSZ.PY --level 17 -C title.nsp command, but is there a way to script this so I don't need to do 1 by 1?

Just mainly because i have 2 games with 15+ DLC and really long names.
 
Is there an easy way to script this in Windows? For now I've just been using the NSZ.PY --level 17 -C title.nsp command, but is there a way to script this so I don't need to do 1 by 1?

Just mainly because i have 2 games with 15+ DLC and really long names.

use powershell and run nsz.py --output outputdir --level 17 -C x:\nsps\*.nsp

or you could use WSL
 
Ironically I use that folder and drive name, had tried that before but it ends up spitting out "OSError: [Errno 22] Invalid argument: 'x:\\nsps\\*.nsp'"

Not sure where the double / is coming from.
 
Is there any cons to using compression lvl 22 rather then 17. Testing it on Astral Chain I found it took almost twice as long and i got another 200MB reduced from the original.
 
Is there an easy way to script this in Windows? For now I've just been using the NSZ.PY --level 17 -C title.nsp command, but is there a way to script this so I don't need to do 1 by 1?

Just mainly because i have 2 games with 15+ DLC and really long names.


for %%i in (F:\*.nsp) do nsz.py --level 22 -C "%%i" --output "F:\nsz"

add that to a text document and rename extension to .bat

change my input directory (F:\) to where your nsps are located, and change output directory (F:\nsz) to where you want the nsz to go
 
is there any danger in doing this (i.e. games not decompressing or becoming corrupted)? I put compression level to 22 using @nicoboss nszip file manager. does the app verify that everything has compressed correctly or should I compress, decompress, then see if they're the same size? it's taken me a very long time to get everything named correctly, checking for corruption, checking for brickers, trimming, and renaming.
 
is there any danger in doing this (i.e. games not decompressing or becoming corrupted)? I put compression level to 22 using @nicoboss nszip file manager. does the app verify that everything has compressed correctly or should I compress, decompress, then see if they're the same size? it's taken me a very long time to get everything named correctly, checking for corruption, checking for brickers, trimming, and renaming.

nsz.py -D file.nsz

it will decompress to nsp and verify

also NSC_Builder has a verify function for NSZ files

--------------------- MERGED ---------------------------

Is there an easy way to script this in Windows? For now I've just been using the NSZ.PY --level 17 -C title.nsp command, but is there a way to script this so I don't need to do 1 by 1?

Just mainly because i have 2 games with 15+ DLC and really long names.

I added folder support, you can do this to compress all NSP in a directory:

nsz.py --level 22 -C folder/to/nsps/
 
  • Like
Reactions: wicksand420
nsz.py -D file.nsz

it will decompress to nsp and verify

also NSC_Builder has a verify function for NSZ files
Only the signature verification would work for now. I have to fix the hashing one and the decryption one for them. Should be done over the weekend.
 
I'm pretty sure I downloaded the latest commits, but did --threads or -t command get removed? It was working last release, but now says invalid args.

Edit: NVM... i just saw a recent commit where threading was removed.

TY for the folder support!
 
Last edited by ,
nsz.py -D file.nsz

it will decompress to nsp and verify

also NSC_Builder has a verify function for NSZ files

--------------------- MERGED ---------------------------



I added folder support, you can do this to compress all NSP in a directory:

nsz.py --level 22 -C folder/to/nsps/

will nszip work for that as well? I think it's verifying the files after compression, but I'm not really sure. should I start over with your python script?
 
will nszip work for that as well? I think it's verifying the files after compression, but I'm not really sure. should I start over with your python script?
I don't think so. I think nszip compressed too much i would probably need to rewrite the verification fully. With nsz format i can adapt my verification checking if exefs decompress well then for the hash one should be fairly similar to what the decompressor does.
 
Why is the install speed increased? I understand the transfer speed increasing, but don't you need to deflate the compression first?
 
Why is the install speed increased? I understand the transfer speed increasing, but don't you need to deflate the compression first?

The switch CPU can decrypt the data faster then the wifi (or lan) chip can transfer data. Cpu power was not the bottleneck, bandwidth was.

This is a great addition with almost no downsides imho. Awesome work @nicoboss (and @blawar for adopting it).
 
  • Like
Reactions: OrGoN3
I can't get this to work. here's what happens:

Microsoft Windows [Version 10.0.17763.805]
(c) 2018 Microsoft Corporation. All rights reserved.

E:\Switch Games>nsz.py --level 22 - C "E:\Switch Games\Nsp DLC"
Traceback (most recent call last):
File "E:\Switch Games\nsz.py", line 17, in <module>
import Fs
File "E:\Switch Games\Fs\__init__.py", line 2, in <module>
from nut import Print
File "E:\Switch Games\nut\__init__.py", line 7
<!DOCTYPE html>
^
SyntaxError: invalid syntax

E:\Switch Games>

no matter what I do I can't execute the script.

--------------------- MERGED ---------------------------

here's what the folder looks like:

upload_2019-10-11_17-29-37.png
 
Last edited by godreborn,

Site & Scene News

Popular threads in this forum