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,730
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,180
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,471
Trophies
3
XP
29,180
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,278
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,468
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,180
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:
    Well I was getting a discount so 320 is probably right
  • BigOnYa @ BigOnYa:
    That is cheap, I used to pay $100 for a tine.
  • Psionic Roshambo @ Psionic Roshambo:
    Tine? One gram?
  • BigOnYa @ BigOnYa:
    Sixteenth
  • Psionic Roshambo @ Psionic Roshambo:
    Also it was literally out of a kilo when I got it off the boat so absolutely pure
  • Psionic Roshambo @ Psionic Roshambo:
    Holy shiz that's a lot
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I was getting 3.5 Grams for 320 could have stepped on it and doubled my money easy lol
    +1
  • BigOnYa @ BigOnYa:
    I'd be afraid to it nowdays, my heart would explode prob. I just stick beers n buds nowdays.
  • Psionic Roshambo @ Psionic Roshambo:
    I would get to drive from tarpon springs to like Miami a thousand bucks lol do that twice a week and back in 92 that was good money
  • Xdqwerty @ Xdqwerty:
    @BigOnYa,
    @Psionic Roshambo what are you guys talking about?
  • Psionic Roshambo @ Psionic Roshambo:
    Blew it on women and muscle cars lol
    +1
  • BigOnYa @ BigOnYa:
    @Xdqwerty Hamster food, its pricey nowadays to keep PCs running.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    I don't do anything except cigarettes and gotta stop eventually lol
    +1
  • BigOnYa @ BigOnYa:
    I'd do shrooms again if could find, and I was outside camping/fishing, and had a cooler full of beer.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I wouldn't mind some LSD, laughing until my face hurt sounds fun lol
    +1
  • BigOnYa @ BigOnYa:
    You ever try soaper powder/qauludes? I did once and like a dumbass drank beer on top of taking, I woke up laying in my backyard in the pouring rain, it knocked me out. I have not seen it around in many many years.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    No never tried a lot of things but never that lol
  • Psionic Roshambo @ Psionic Roshambo:
    I did pass out one time on a floor after taking a bunch of Ambien lol thought it would help me sleep and did it lol
  • Psionic Roshambo @ Psionic Roshambo:
    Girlfriend was working at a pharmacy and stole like 500 of them, was and still is the biggest pill bottle I have ever seen lol
  • K3Nv2 @ K3Nv2:
    Ativan is pretty legit
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The last time I had to take something to help me sleep, I was prescribed Trazadone it was pretty OK to be honest.
  • Psionic Roshambo @ Psionic Roshambo:
    Not something I need at all these days, doing a lot better lol
  • BigOnYa @ BigOnYa:
    That Nuka Cola video with old ice grinder is cool, I want one.
    +1
    BigOnYa @ BigOnYa: That Nuka Cola video with old ice grinder is cool, I want one. +1