Homebrew RELEASE Ryjin: A NSZ Converter Mod

  • Thread starter Thread starter GnK23
  • Start date Start date
  • Views Views 115,768
  • Replies Replies 173
  • Likes Likes 12
Oh yes of course. Many thanks.

EDIT: Well, so I don't recall how to get a new keys.txt with this method. I have prod.keys, title.keys, and device.keys. The old keys.py script doesn't seem to work for newer firmware nor is it supposed to. So how do I generate a new keys.txt? Is it just a copy/pasted combination from the contents of the aforementioned .keys files?

rename prod.keys
 
  • Like
Reactions: MusicallyInspired
Updated to 3.0 using 3.1.1 NSZ python and 4nxci.
added
XCI to NSZ convertion
XCZ to NSZ convertion
XCZ to XCI decompression


Apparently I decided to continue using the old cmd method because it does not hang after the file finishes conversion. Pressing a key would return you to the menu where you could choose your next batch of nsp to convert
 
Last edited by GnK23,
Updated to 3.0 using 3.1.1 NSZ python and 4nxci.
added
XCI to NSZ convertion
XCZ to NSZ convertion
XCZ to XCI decompression


Apparently I decided to continue using the old cmd method because it does not hang after the file finishes conversion. Pressing a key would return you to the menu where you could choose your next batch of nsp to convert
Thanks for the great update. However, can't get it to work.

Version 2.5 was working fine. I've updated python using your installer, but when I run "Install requirements.bat" I keep getting this error:

OpH9ru4.jpg
 
Thanks for the great update. However, can't get it to work.

Version 2.5 was working fine. I've updated python using your installer, but when I run "Install requirements.bat" I keep getting this error:

OpH9ru4.jpg
Try doing this.
1. inside the requirements.txt paste this line
pycryptodome>=3.9.0
zstandard
enlighten
kivy_deps.sdl2==0.1.22
kivy_deps.glew==0.1.12
kivy==1.11.1
2. Save this
3. Make another txt file
py -3 -m pip install -r requirements.txt
4. Save it under the name install requirements.bat
5. Run the bat file
 
Try doing this.
1. inside the requirements.txt paste this line
pycryptodome>=3.9.0
zstandard
enlighten
kivy_deps.sdl2==0.1.22
kivy_deps.glew==0.1.12
kivy==1.11.1
2. Save this
3. Make another txt file
py -3 -m pip install -r requirements.txt
4. Save it under the name install requirements.bat
5. Run the bat file

Thank you very much. This worked!
 
  • Like
Reactions: GnK23
Reverted to old 2.5 version. This is the final and stable build of ryjin. just place the keys.txt inside the ryjin folder.
 
3.0 uses wrong keys for XCZ. It uses masterkey_10 instead of masterkey_0a. It also results in invalid xsz.
 
Feel free to edit the bat command. I no longer wish to improve anymore the files.

@Echo off
title RYJIN 2.5 NSZ CONVERTER
set "threads="
set "level="
goto 'selection'

: 'selection'
cls
ECHO RYJIN 2.5 NSZ CONVERTER
ECHO by Gnk23 and Rylen101 of Pinoy Gaming Hustlers
ECHO Special thanks to blawar , nicoboss , and taorn for the NSZ compressor codes
ECHO.
ECHO.
ECHO.
ECHO "Select Compression Type To Use:"
ECHO.
ECHO. S - SOLID COMPRESSION
ECHO. B - BLOCK COMPRESSION
ECHO. D - DECOMPRESS NSZ TO NSP
ECHO. SB - CONVERT SOLID NSZ TO BLOCK NSZ
ECHO.
ECHO REMINDER:
ECHO SOLID COMPRESSION simply converts NSP to a smaller size NSZ.
ECHO BLOCK COMPRESSION supports playing compressed games and is currently supported by Tinfoil 6+.
ECHO.
ECHO.
ECHO.INPUT:
set choice=
set /p choice=
IF '%choice%'=='S' goto 'solid'
IF '%choice%'=='s' goto 'solid'
IF '%choice%'=='b' goto 'block'
IF '%choice%'=='B' goto 'block'
IF '%choice%'=='d' goto 'decompress'
IF '%choice%'=='D' goto 'decompress'
IF '%choice%'=='SB' goto 'Solid to BLOCK Converter'
IF '%choice%'=='sb' goto 'Solid to BLOCK Converter'
IF '%choice%'=='Sb' goto 'Solid to BLOCK Converter'
IF '%choice%'=='sB' goto 'Solid to BLOCK Converter'

goto 'selection'

: 'Solid to BLOCK Converter'
cls
ECHO -SOLID to BLOCK NSZ CONVERTER-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSZ Files:"
goto 'sbrmautoman'

:'sbrmautoman'
cls
ECHO -SOLID to BLOCK NSZ CONVERTER-
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'sbinputthread'
IF %ERRORLEVEL% EQU 1 goto 'sbrm'


: 'sbinputthread'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'sbinputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'sbinvalidthread'
if /I %threads% leq 0 goto 'sbinvalidthread'

: 'sbinvalidthread'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'sbinputthread'

: 'sbinputlevel'
ECHO.
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'sbmrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'sbinvalidlevel'

: 'sbinvalidlevel'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'sinputlevel'
goto 'sbmrm'


: 'sbmrm'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source && for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit


: 'sbrm'
cls
ECHO -AUTO SOLID to BLOCK NSZ CONVERTER-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source && for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'decompress'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSZ Files:"
goto 'drm'


: 'drm'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
Choice /C YN /M "Would you like to delete NSZ after it decompress?"
IF %ERRORLEVEL% EQU 1 goto 'dstartrm'
IF %ERRORLEVEL% EQU 2 goto 'dstart'

: 'dstart'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'dstartrm'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'solid'
cls
ECHO -SOLID COMPRESSION-
ECHO.
: 'sfirst'
ECHO.
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'smanlocation'
IF %ERRORLEVEL% EQU 1 goto 'sautolocation'

: 'sautolocation'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'sarm'

: 'sarm'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'srmauto'
IF %ERRORLEVEL% EQU 2 goto 'sauto'

: 'sauto'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'srmauto'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

: 'smanlocation'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'sinputthread'


: 'sinputthread'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'sinputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'sinvalidthread'
if /I %threads% leq 0 goto 'sinvalidthread'

: 'sinvalidthread'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'sinputthread'

: 'sinputlevel'
ECHO.
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'smrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'sinvalidlevel'

: 'sinvalidlevel'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'sinputlevel'
goto 'smrm'

: 'smrm'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'smanrm'
IF %ERRORLEVEL% EQU 2 goto 'sman'
goto 'scustomrun'


: 'sman'
cls
ECHO -SOLID COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe --level %level% --threads %threads% -C "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'smanrm'
cls
ECHO -SOLID COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

: 'block'
cls
ECHO -BLOCK COMPRESSION-
ECHO.
: 'bfirst'
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'bmanlocation'
IF %ERRORLEVEL% EQU 1 goto 'bautolocation'


: 'bautolocation'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'barm'

: 'barm'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'brmauto'
IF %ERRORLEVEL% EQU 2 goto 'bauto'

: 'bauto'
cls
ECHO -AUTO BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\
@Echo Done :)
pause
exit


: 'brmauto'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'bmanlocation'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'binputthread'


: 'binputthread'
cls
ECHO -MANUAL BLOCK COMPRESSION-
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'binputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'binvalidthread'
if /I %threads% leq 0 goto 'binvalidthread'

: 'binvalidthread'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'binputthread'

: 'binputlevel'
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'bmrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'binvalidlevel'

: 'binvalidlevel'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'binputlevel'
goto 'bmrm'

: 'bmrm'
cls
ECHO -BLOCK COMPRESSION-
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'bmanrm'
IF %ERRORLEVEL% EQU 2 goto 'bman'
goto 'bmrm'


: 'bman'
cls
ECHO -MANUAL BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\
@Echo Done :)
pause
exit

: 'bmanrm'
cls
ECHO -MANUAL BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

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

Feel free to edit the batch command and make improvements. I do not wish to update anymore the thread.

@Echo off
title RYJIN 2.5 NSZ CONVERTER
set "threads="
set "level="
goto 'selection'

: 'selection'
cls
ECHO RYJIN 2.5 NSZ CONVERTER
ECHO by Gnk23 and Rylen101 of Pinoy Gaming Hustlers
ECHO Special thanks to blawar , nicoboss , and taorn for the NSZ compressor codes
ECHO.
ECHO.
ECHO.
ECHO "Select Compression Type To Use:"
ECHO.
ECHO. S - SOLID COMPRESSION
ECHO. B - BLOCK COMPRESSION
ECHO. D - DECOMPRESS NSZ TO NSP
ECHO. SB - CONVERT SOLID NSZ TO BLOCK NSZ
ECHO.
ECHO REMINDER:
ECHO SOLID COMPRESSION simply converts NSP to a smaller size NSZ.
ECHO BLOCK COMPRESSION supports playing compressed games and is currently supported by Tinfoil 6+.
ECHO.
ECHO.
ECHO.INPUT:
set choice=
set /p choice=
IF '%choice%'=='S' goto 'solid'
IF '%choice%'=='s' goto 'solid'
IF '%choice%'=='b' goto 'block'
IF '%choice%'=='B' goto 'block'
IF '%choice%'=='d' goto 'decompress'
IF '%choice%'=='D' goto 'decompress'
IF '%choice%'=='SB' goto 'Solid to BLOCK Converter'
IF '%choice%'=='sb' goto 'Solid to BLOCK Converter'
IF '%choice%'=='Sb' goto 'Solid to BLOCK Converter'
IF '%choice%'=='sB' goto 'Solid to BLOCK Converter'

goto 'selection'

: 'Solid to BLOCK Converter'
cls
ECHO -SOLID to BLOCK NSZ CONVERTER-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSZ Files:"
goto 'sbrmautoman'

:'sbrmautoman'
cls
ECHO -SOLID to BLOCK NSZ CONVERTER-
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'sbinputthread'
IF %ERRORLEVEL% EQU 1 goto 'sbrm'


: 'sbinputthread'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'sbinputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'sbinvalidthread'
if /I %threads% leq 0 goto 'sbinvalidthread'

: 'sbinvalidthread'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'sbinputthread'

: 'sbinputlevel'
ECHO.
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'sbmrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'sbinvalidlevel'

: 'sbinvalidlevel'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'sinputlevel'
goto 'sbmrm'


: 'sbmrm'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source && for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit


: 'sbrm'
cls
ECHO -AUTO SOLID to BLOCK NSZ CONVERTER-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source && for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'decompress'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSZ Files:"
goto 'drm'


: 'drm'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
Choice /C YN /M "Would you like to delete NSZ after it decompress?"
IF %ERRORLEVEL% EQU 1 goto 'dstartrm'
IF %ERRORLEVEL% EQU 2 goto 'dstart'

: 'dstart'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'dstartrm'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'solid'
cls
ECHO -SOLID COMPRESSION-
ECHO.
: 'sfirst'
ECHO.
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'smanlocation'
IF %ERRORLEVEL% EQU 1 goto 'sautolocation'

: 'sautolocation'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'sarm'

: 'sarm'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'srmauto'
IF %ERRORLEVEL% EQU 2 goto 'sauto'

: 'sauto'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'srmauto'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

: 'smanlocation'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'sinputthread'


: 'sinputthread'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'sinputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'sinvalidthread'
if /I %threads% leq 0 goto 'sinvalidthread'

: 'sinvalidthread'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'sinputthread'

: 'sinputlevel'
ECHO.
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'smrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'sinvalidlevel'

: 'sinvalidlevel'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'sinputlevel'
goto 'smrm'

: 'smrm'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'smanrm'
IF %ERRORLEVEL% EQU 2 goto 'sman'
goto 'scustomrun'


: 'sman'
cls
ECHO -SOLID COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe --level %level% --threads %threads% -C "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'smanrm'
cls
ECHO -SOLID COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

: 'block'
cls
ECHO -BLOCK COMPRESSION-
ECHO.
: 'bfirst'
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'bmanlocation'
IF %ERRORLEVEL% EQU 1 goto 'bautolocation'


: 'bautolocation'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'barm'

: 'barm'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'brmauto'
IF %ERRORLEVEL% EQU 2 goto 'bauto'

: 'bauto'
cls
ECHO -AUTO BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\
@Echo Done :)
pause
exit


: 'brmauto'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'bmanlocation'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'binputthread'


: 'binputthread'
cls
ECHO -MANUAL BLOCK COMPRESSION-
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'binputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'binvalidthread'
if /I %threads% leq 0 goto 'binvalidthread'

: 'binvalidthread'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'binputthread'

: 'binputlevel'
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'bmrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'binvalidlevel'

: 'binvalidlevel'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'binputlevel'
goto 'bmrm'

: 'bmrm'
cls
ECHO -BLOCK COMPRESSION-
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'bmanrm'
IF %ERRORLEVEL% EQU 2 goto 'bman'
goto 'bmrm'


: 'bman'
cls
ECHO -MANUAL BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\
@Echo Done :)
pause
exit

: 'bmanrm'
cls
ECHO -MANUAL BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit
 
@Echo off
title RYJIN 2.5 NSZ CONVERTER
set "threads="
set "level="
goto 'selection'

: 'selection'
cls
ECHO RYJIN 2.5 NSZ CONVERTER
ECHO by Gnk23 and Rylen101 of Pinoy Gaming Hustlers
ECHO Special thanks to blawar , nicoboss , and taorn for the NSZ compressor codes
ECHO.
ECHO.
ECHO.
ECHO "Select Compression Type To Use:"
ECHO.
ECHO. S - SOLID COMPRESSION
ECHO. B - BLOCK COMPRESSION
ECHO. D - DECOMPRESS NSZ TO NSP
ECHO. SB - CONVERT SOLID NSZ TO BLOCK NSZ
ECHO.
ECHO REMINDER:
ECHO SOLID COMPRESSION simply converts NSP to a smaller size NSZ.
ECHO BLOCK COMPRESSION supports playing compressed games and is currently supported by Tinfoil 6+.
ECHO.
ECHO.
ECHO.INPUT:
set choice=
set /p choice=
IF '%choice%'=='S' goto 'solid'
IF '%choice%'=='s' goto 'solid'
IF '%choice%'=='b' goto 'block'
IF '%choice%'=='B' goto 'block'
IF '%choice%'=='d' goto 'decompress'
IF '%choice%'=='D' goto 'decompress'
IF '%choice%'=='SB' goto 'Solid to BLOCK Converter'
IF '%choice%'=='sb' goto 'Solid to BLOCK Converter'
IF '%choice%'=='Sb' goto 'Solid to BLOCK Converter'
IF '%choice%'=='sB' goto 'Solid to BLOCK Converter'

goto 'selection'

: 'Solid to BLOCK Converter'
cls
ECHO -SOLID to BLOCK NSZ CONVERTER-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSZ Files:"
goto 'sbrmautoman'

:'sbrmautoman'
cls
ECHO -SOLID to BLOCK NSZ CONVERTER-
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'sbinputthread'
IF %ERRORLEVEL% EQU 1 goto 'sbrm'


: 'sbinputthread'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'sbinputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'sbinvalidthread'
if /I %threads% leq 0 goto 'sbinvalidthread'

: 'sbinvalidthread'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'sbinputthread'

: 'sbinputlevel'
ECHO.
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'sbmrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'sbinvalidlevel'

: 'sbinvalidlevel'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'sinputlevel'
goto 'sbmrm'


: 'sbmrm'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source && for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit


: 'sbrm'
cls
ECHO -AUTO SOLID to BLOCK NSZ CONVERTER-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source && for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'decompress'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSZ Files:"
goto 'drm'


: 'drm'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
Choice /C YN /M "Would you like to delete NSZ after it decompress?"
IF %ERRORLEVEL% EQU 1 goto 'dstartrm'
IF %ERRORLEVEL% EQU 2 goto 'dstart'

: 'dstart'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'dstartrm'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'solid'
cls
ECHO -SOLID COMPRESSION-
ECHO.
: 'sfirst'
ECHO.
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'smanlocation'
IF %ERRORLEVEL% EQU 1 goto 'sautolocation'

: 'sautolocation'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'sarm'

: 'sarm'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'srmauto'
IF %ERRORLEVEL% EQU 2 goto 'sauto'

: 'sauto'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'srmauto'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

: 'smanlocation'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'sinputthread'


: 'sinputthread'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'sinputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'sinvalidthread'
if /I %threads% leq 0 goto 'sinvalidthread'

: 'sinvalidthread'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'sinputthread'

: 'sinputlevel'
ECHO.
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'smrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'sinvalidlevel'

: 'sinvalidlevel'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'sinputlevel'
goto 'smrm'

: 'smrm'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'smanrm'
IF %ERRORLEVEL% EQU 2 goto 'sman'
goto 'scustomrun'


: 'sman'
cls
ECHO -SOLID COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe --level %level% --threads %threads% -C "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'smanrm'
cls
ECHO -SOLID COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

: 'block'
cls
ECHO -BLOCK COMPRESSION-
ECHO.
: 'bfirst'
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'bmanlocation'
IF %ERRORLEVEL% EQU 1 goto 'bautolocation'


: 'bautolocation'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'barm'

: 'barm'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'brmauto'
IF %ERRORLEVEL% EQU 2 goto 'bauto'

: 'bauto'
cls
ECHO -AUTO BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\
@Echo Done :)
pause
exit


: 'brmauto'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'bmanlocation'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'binputthread'


: 'binputthread'
cls
ECHO -MANUAL BLOCK COMPRESSION-
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'binputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'binvalidthread'
if /I %threads% leq 0 goto 'binvalidthread'

: 'binvalidthread'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'binputthread'

: 'binputlevel'
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'bmrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'binvalidlevel'

: 'binvalidlevel'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'binputlevel'
goto 'bmrm'

: 'bmrm'
cls
ECHO -BLOCK COMPRESSION-
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'bmanrm'
IF %ERRORLEVEL% EQU 2 goto 'bman'
goto 'bmrm'


: 'bman'
cls
ECHO -MANUAL BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\
@Echo Done :)
pause
exit

: 'bmanrm'
cls
ECHO -MANUAL BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

— Posts automatically merged - Please don't double post! —

Feel free to edit the batch command and make improvements. I do not wish to update anymore the thread.

@Echo off
title RYJIN 2.5 NSZ CONVERTER
set "threads="
set "level="
goto 'selection'

: 'selection'
cls
ECHO RYJIN 2.5 NSZ CONVERTER
ECHO by Gnk23 and Rylen101 of Pinoy Gaming Hustlers
ECHO Special thanks to blawar , nicoboss , and taorn for the NSZ compressor codes
ECHO.
ECHO.
ECHO.
ECHO "Select Compression Type To Use:"
ECHO.
ECHO. S - SOLID COMPRESSION
ECHO. B - BLOCK COMPRESSION
ECHO. D - DECOMPRESS NSZ TO NSP
ECHO. SB - CONVERT SOLID NSZ TO BLOCK NSZ
ECHO.
ECHO REMINDER:
ECHO SOLID COMPRESSION simply converts NSP to a smaller size NSZ.
ECHO BLOCK COMPRESSION supports playing compressed games and is currently supported by Tinfoil 6+.
ECHO.
ECHO.
ECHO.INPUT:
set choice=
set /p choice=
IF '%choice%'=='S' goto 'solid'
IF '%choice%'=='s' goto 'solid'
IF '%choice%'=='b' goto 'block'
IF '%choice%'=='B' goto 'block'
IF '%choice%'=='d' goto 'decompress'
IF '%choice%'=='D' goto 'decompress'
IF '%choice%'=='SB' goto 'Solid to BLOCK Converter'
IF '%choice%'=='sb' goto 'Solid to BLOCK Converter'
IF '%choice%'=='Sb' goto 'Solid to BLOCK Converter'
IF '%choice%'=='sB' goto 'Solid to BLOCK Converter'

goto 'selection'

: 'Solid to BLOCK Converter'
cls
ECHO -SOLID to BLOCK NSZ CONVERTER-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSZ Files:"
goto 'sbrmautoman'

:'sbrmautoman'
cls
ECHO -SOLID to BLOCK NSZ CONVERTER-
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'sbinputthread'
IF %ERRORLEVEL% EQU 1 goto 'sbrm'


: 'sbinputthread'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'sbinputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'sbinvalidthread'
if /I %threads% leq 0 goto 'sbinvalidthread'

: 'sbinvalidthread'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'sbinputthread'

: 'sbinputlevel'
ECHO.
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'sbmrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'sbinvalidlevel'

: 'sbinvalidlevel'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'sinputlevel'
goto 'sbmrm'


: 'sbmrm'
cls
ECHO -MANUAL SOLID to BLOCK NSZ CONVERTER-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source && for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit


: 'sbrm'
cls
ECHO -AUTO SOLID to BLOCK NSZ CONVERTER-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source && for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'decompress'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSZ Files:"
goto 'drm'


: 'drm'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
Choice /C YN /M "Would you like to delete NSZ after it decompress?"
IF %ERRORLEVEL% EQU 1 goto 'dstartrm'
IF %ERRORLEVEL% EQU 2 goto 'dstart'

: 'dstart'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'dstartrm'
cls
ECHO -DECOMPRESS NSZ TO NSP-
ECHO.
for %%i in ("%sin%"\*.nsz) do nsz.exe -D "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'solid'
cls
ECHO -SOLID COMPRESSION-
ECHO.
: 'sfirst'
ECHO.
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'smanlocation'
IF %ERRORLEVEL% EQU 1 goto 'sautolocation'

: 'sautolocation'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'sarm'

: 'sarm'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'srmauto'
IF %ERRORLEVEL% EQU 2 goto 'sauto'

: 'sauto'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'srmauto'
cls
ECHO -AUTO SOLID COMPRESSION-
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

: 'smanlocation'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'sinputthread'


: 'sinputthread'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'sinputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'sinvalidthread'
if /I %threads% leq 0 goto 'sinvalidthread'

: 'sinvalidthread'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'sinputthread'

: 'sinputlevel'
ECHO.
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'smrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'sinvalidlevel'

: 'sinvalidlevel'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'sinputlevel'
goto 'smrm'

: 'smrm'
cls
ECHO -MANUAL SOLID COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'smanrm'
IF %ERRORLEVEL% EQU 2 goto 'sman'
goto 'scustomrun'


: 'sman'
cls
ECHO -SOLID COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe --level %level% --threads %threads% -C "%%i" --output "%sin%"\
@Echo Done :)
Pause
exit

: 'smanrm'
cls
ECHO -SOLID COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

: 'block'
cls
ECHO -BLOCK COMPRESSION-
ECHO.
: 'bfirst'
ECHO.
ECHO.
Choice /C YN /M "Do you want to use the automatic default settings?"
IF %ERRORLEVEL% EQU 2 goto 'bmanlocation'
IF %ERRORLEVEL% EQU 1 goto 'bautolocation'


: 'bautolocation'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'barm'

: 'barm'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'brmauto'
IF %ERRORLEVEL% EQU 2 goto 'bauto'

: 'bauto'
cls
ECHO -AUTO BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\
@Echo Done :)
pause
exit


: 'brmauto'
cls
ECHO -AUTO BLOCK COMPRESSION-
ECHO.
ECHO.
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level 18 --threads %NUMBER_OF_PROCESSORS% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit



: 'bmanlocation'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
ECHO NOTE: The input folder is also the output folder
ECHO.
set /p sin= "Enter Input Location of the NSP Files:"
goto 'binputthread'


: 'binputthread'
cls
ECHO -MANUAL BLOCK COMPRESSION-
@Echo CPU Model:
wmic cpu get name
@Echo Available CPU threads [ %NUMBER_OF_PROCESSORS% ]
set /p threads="Enter number of CPU Threads to use: "
if /I %threads% leq %NUMBER_OF_PROCESSORS% if /I %threads% gtr 0 goto 'binputlevel'
if /I %threads% gtr %NUMBER_OF_PROCESSORS% goto 'binvalidthread'
if /I %threads% leq 0 goto 'binvalidthread'

: 'binvalidthread'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value:%NUMBER_OF_PROCESSORS%"
IF %ERRORLEVEL% EQU 1 set /A threads=%NUMBER_OF_PROCESSORS%
IF %ERRORLEVEL% EQU 2 goto 'binputthread'

: 'binputlevel'
set /p level="Enter level of compression to use [22 max]: "
if /I %level% gtr 0 if /I %level% leq 22 goto 'bmrm'
if /I %level% leq 0 if /I %level% gtr 22 goto 'binvalidlevel'

: 'binvalidlevel'
cls
ECHO -MANUAL BLOCK COMPRESSION-
ECHO.
Choice /C YN /M "Input is invalid, would you like to use the default value instead? Default Value: 18"
IF %ERRORLEVEL% EQU 1 set /A level=18
IF %ERRORLEVEL% EQU 2 goto 'binputlevel'
goto 'bmrm'

: 'bmrm'
cls
ECHO -BLOCK COMPRESSION-
Choice /C YN /M "Would you like to delete NSP after it compress?"
IF %ERRORLEVEL% EQU 1 goto 'bmanrm'
IF %ERRORLEVEL% EQU 2 goto 'bman'
goto 'bmrm'


: 'bman'
cls
ECHO -MANUAL BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\
@Echo Done :)
pause
exit

: 'bmanrm'
cls
ECHO -MANUAL BLOCK COMPRESSION-
for %%i in ("%sin%"\*.nsp) do nsz.exe -B --level %level% --threads %threads% -C "%%i" --output "%sin%"\ --rm-source
@Echo Done :)
Pause
exit

Which file bat do you adapt with this code?
 

Site & Scene News

Popular threads in this forum