Homebrew RELEASE NSZ Title Compression Results

D

Deleted User

Guest
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.
 

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
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
 
D

Deleted User

Guest
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.
 

ShigoNaito

Active Member
Newcomer
Joined
Mar 12, 2019
Messages
28
Trophies
0
XP
775
Country
Philippines
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.
 

Mthodmn101

Well-Known Member
Member
Joined
Jan 31, 2008
Messages
650
Trophies
1
XP
1,705
Country
United States
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
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,136
Country
United States
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.
 

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
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

JRoad

Developer
Developer
Joined
May 18, 2018
Messages
1,003
Trophies
0
XP
1,746
Country
Spain
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.
 
D

Deleted User

Guest
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 ,

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,136
Country
United States
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?
 

JRoad

Developer
Developer
Joined
May 18, 2018
Messages
1,003
Trophies
0
XP
1,746
Country
Spain
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.
 

OrGoN3

Well-Known Member
Member
Joined
Apr 23, 2007
Messages
3,241
Trophies
1
XP
3,253
Country
United States
Why is the install speed increased? I understand the transfer speed increasing, but don't you need to deflate the compression first?
 

KirovAir

Alcoholic Programmer
Member
Joined
Dec 7, 2006
Messages
768
Trophies
1
Age
32
Location
Netherlands
Website
www.jessesander.nl
XP
2,444
Country
Netherlands
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

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,136
Country
United States
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

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: good night