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
653
Trophies
1
XP
1,741
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,470
Trophies
3
XP
29,190
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,756
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,470
Trophies
3
XP
29,190
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,756
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,296
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
771
Trophies
1
Age
32
Location
Netherlands
Website
www.jessesander.nl
XP
2,485
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,470
Trophies
3
XP
29,190
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
  • Psionic Roshambo @ Psionic Roshambo:
    I think I have a 256GB card in my 3DS lol
  • Psionic Roshambo @ Psionic Roshambo:
    It's a New 3DS XL so it's still under warranty... If it ever breaks gonna make Nintendo fix it lol You said it was new.... For eternity!!!
  • Psionic Roshambo @ Psionic Roshambo:
    But my 3DS is loaded with emulators and 3DS games and DS games and GBA games probably thousands of games in total lol
  • Xdqwerty @ Xdqwerty:
    Brb going with my dad
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, are most of those games shovelware?
    +1
  • K3Nv2 @ K3Nv2:
    Nah gotta buy 3 1tb SD cards for 3ds the entire libraries need archived in my home
    +1
  • SylverReZ @ SylverReZ:
    >buys x3 1TB SD cards
    >stores the entire 3DS library on them
    >installs CFW
    >realised why I wasted loads of money and resources
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol no I clean my sets
  • K3Nv2 @ K3Nv2:
    Cause it's in my home ready to go
  • K3Nv2 @ K3Nv2:
    Like uremum
  • Psionic Roshambo @ Psionic Roshambo:
    But 100 games on SNES and Genesis and GBA then TG16 and NES and GB and GBC then all the other random systems and arcade games it all adds up lol
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Virtual Boy alone has probably 5 games!!! Lol
    +1
  • K3Nv2 @ K3Nv2:
    I won't mention any names in chat but some of us wastes $300 on preloaded hdds :tpi:
    +1
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, The PS5 had none.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol I spent more than that on a stuffed 4TB drive lol
  • K3Nv2 @ K3Nv2:
    Honestly I've yet to fill the 1tb internal drive on my ps5
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, 1) except final fantasy 16. 2) why would I have a console's whole catalogue if most of the games are either shovelware or terrible games?
  • Psionic Roshambo @ Psionic Roshambo:
    Kind of a waste, but the allure of all those games over 100,000
  • Psionic Roshambo @ Psionic Roshambo:
    Some shovel ware with low ratings you might enjoy more than the ratings would sugest
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Cruisn on the Wii is one of my personal examples of that, it's considered one of the worst games of all time, I loved it and completed it several times.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The trick for me was to go into the settings and crank up the Wiimote sensitivity to the max and it gets twitchy but you can win that way lol
  • Psionic Roshambo @ Psionic Roshambo:
    Lots of other games I enjoyed that reviews would say otherwise lol
  • btei @ btei:
    lethal company servers are down rn
  • btei @ btei:
    my pocket pikachu is going crazy rn
  • Psionic Roshambo @ Psionic Roshambo:
    Pocket Pikachu sounds dirty lol
    Psionic Roshambo @ Psionic Roshambo: Pocket Pikachu sounds dirty lol