Homebrew RELEASE Ryjin: A NSZ Converter Mod

nicoboss

Well-Known Member
Member
Joined
Feb 1, 2019
Messages
132
Trophies
0
Age
26
XP
1,196
Country
Switzerland
Will check on the codes again during my spare time. Personally I removed the delete command from my script because I don't want to accidentally delete my nsp.

EDIT:
I checked the codes and it is not possible without editing the main nsz.py. If @nicoboss will add a new command to delete the nsp after it compresses then it will be possible to add it for the batch program. My codes simply executes command in a batch format.
No problem I will add that in the next few days. For next time feel free to just create a pull request when you need to modify something inside nsz.py. I have absolutely no problem with you adding additional command line arguments. You can even pull request all your batch scripts into NSZ and if you like.

Can you compress nsz further/again after converting the nsp to nsz the first time? I did a few already deleted the nsp but may want to choose a higher compression level.
Just decompress and recompress with a higher compression level. NSZ is a lossless file format so after decompressing you have the same NSP as before.
 

ehassan

Member
Newcomer
Joined
Nov 2, 2019
Messages
8
Trophies
0
Age
44
XP
148
Country
Egypt
I used "Install requirements.bat", but I have the following error, what did I miss?

Traceback (most recent call last):
File "E:\Ryjin 2.0\nsz.py", line 9, in <module>
import urllib3
ModuleNotFoundError: No module named 'urllib3'
 
Last edited by ehassan,

Taorn

Well-Known Member
Member
Joined
May 27, 2017
Messages
257
Trophies
0
Age
53
XP
1,837
Country
United States
I used "Install requirements.bat", but I have the following error, what did I miss?

Traceback (most recent call last):
File "E:\Ryjin 2.0\nsz.py", line 9, in <module>
import urllib3
ModuleNotFoundError: No module named 'urllib3'

Open a cmd window and type in:
Code:
pip install urllib3

If you get an error that pip is not found, reinstall Python with the option "add to path".
 

ehassan

Member
Newcomer
Joined
Nov 2, 2019
Messages
8
Trophies
0
Age
44
XP
148
Country
Egypt
Open a cmd window and type in:
Code:
pip install urllib3

If you get an error that pip is not found, reinstall Python with the option "add to path".

Thx for your help, I followed your instructions,and it passed, but another error showed up:

"Traceback (most recent call last):
File "E:\Ryjin 2.0\nsz.py", line 16, in <module>
import Fs
File "E:\Ryjin 2.0\Fs\__init__.py", line 1, in <module>
import Fs.Nsp
File "E:\Ryjin 2.0\Fs\Nsp.py", line 1, in <module>
from nut import aes128
File "E:\Ryjin 2.0\nut\aes128.py", line 5, in <module>
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
Traceback (most recent call last):
File "E:\Ryjin 2.0\nsz.py", line 16, in <module>
import Fs
File "E:\Ryjin 2.0\Fs\__init__.py", line 1, in <module>
import Fs.Nsp
File "E:\Ryjin 2.0\Fs\Nsp.py", line 1, in <module>
from nut import aes128
File "E:\Ryjin 2.0\nut\aes128.py", line 5, in <module>
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'"


I tried to install Crypto the same way "pip install crypto", it is installed, but still have the same issue, I also uninstalled Python and reinstalled it again, with no success.
 

Taorn

Well-Known Member
Member
Joined
May 27, 2017
Messages
257
Trophies
0
Age
53
XP
1,837
Country
United States
Thx for your help, I followed your instructions,and it passed, but another error showed up:

"Traceback (most recent call last):
File "E:\Ryjin 2.0\nsz.py", line 16, in <module>
import Fs
File "E:\Ryjin 2.0\Fs\__init__.py", line 1, in <module>
import Fs.Nsp
File "E:\Ryjin 2.0\Fs\Nsp.py", line 1, in <module>
from nut import aes128
File "E:\Ryjin 2.0\nut\aes128.py", line 5, in <module>
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
Traceback (most recent call last):
File "E:\Ryjin 2.0\nsz.py", line 16, in <module>
import Fs
File "E:\Ryjin 2.0\Fs\__init__.py", line 1, in <module>
import Fs.Nsp
File "E:\Ryjin 2.0\Fs\Nsp.py", line 1, in <module>
from nut import aes128
File "E:\Ryjin 2.0\nut\aes128.py", line 5, in <module>
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'"


I tried to install Crypto the same way "pip install crypto", it is installed, but still have the same issue, I also uninstalled Python and reinstalled it again, with no success.

Did you successfully install the requirements listed in the requirements.txt? Try executing it again:

Code:
 py -3 -m pip install -r requirements.txt

Just as heads up:
Navigate to the folder that contains the requirements.txt. Then type cmd into the explorer address line. Now execute the py command.
 
Last edited by Taorn,

GnK23

Well-Known Member
OP
Member
Joined
Apr 6, 2016
Messages
170
Trophies
0
Age
35
XP
671
Country
United States
Thx for your help, I followed your instructions,and it passed, but another error showed up:

"Traceback (most recent call last):
File "E:\Ryjin 2.0\nsz.py", line 16, in <module>
import Fs
File "E:\Ryjin 2.0\Fs\__init__.py", line 1, in <module>
import Fs.Nsp
File "E:\Ryjin 2.0\Fs\Nsp.py", line 1, in <module>
from nut import aes128
File "E:\Ryjin 2.0\nut\aes128.py", line 5, in <module>
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
Traceback (most recent call last):
File "E:\Ryjin 2.0\nsz.py", line 16, in <module>
import Fs
File "E:\Ryjin 2.0\Fs\__init__.py", line 1, in <module>
import Fs.Nsp
File "E:\Ryjin 2.0\Fs\Nsp.py", line 1, in <module>
from nut import aes128
File "E:\Ryjin 2.0\nut\aes128.py", line 5, in <module>
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'"


I tried to install Crypto the same way "pip install crypto", it is installed, but still have the same issue, I also uninstalled Python and reinstalled it again, with no success.
Make sure to extract everything inside the the folder
 

ehassan

Member
Newcomer
Joined
Nov 2, 2019
Messages
8
Trophies
0
Age
44
XP
148
Country
Egypt
Did you successfully install the requirements listed in the requirements.txt? Try executing it again:

Code:
 py -3 -m pip install -r requirements.txt

Just as heads up:
Navigate to the folder that contains the requirements.txt. Then type cmd into the explorer address line. Now execute the py command.

thx again man, I installed all the required packages except zstandard, I confirmed using pip list

I can't install zstandard, it always end with error
I'm using "pip install zstandard --upgrade"
 

Taorn

Well-Known Member
Member
Joined
May 27, 2017
Messages
257
Trophies
0
Age
53
XP
1,837
Country
United States
thx again man, I installed all the required packages except zstandard, I confirmed using pip list

I can't install zstandard, it always end with error
I'm using "pip install zstandard --upgrade"

What error do you get? Post it here.
 

Taorn

Well-Known Member
Member
Joined
May 27, 2017
Messages
257
Trophies
0
Age
53
XP
1,837
Country
United States
it's very long, i attached as a text file

There is no rc.exe in your path. Check if you have the required file in C:\Program Files (x86)\Windows Kits\XX\bin\x64. (You will have to take a look which version you have installed. Substitute the XX for your version number)
Alternatively try looking under C:\Program Files (x86)\Windows Kits\10\bin\10.X.XXXXX.X\x64

Look for rc.exe and rcdll.dll. Copy them both to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\.
Also add C:\Program Files (x86)\Windows Kits\8.0\bin\x64 to your PATH variable.

Afterwards close any open command line window and open a new one.
Try again to install the missing library.
 
Last edited by Taorn,

nicoboss

Well-Known Member
Member
Joined
Feb 1, 2019
Messages
132
Trophies
0
Age
26
XP
1,196
Country
Switzerland
it's very long, i attached as a text file
Honestly it might be easier to just use my experimental Windows executable build of NSZ from last Sunday: http://www.nicobosshard.ch/nsz/nsz_nuitka_17f153d_portable.zip
Just extract and it will work. No Python or any Dependencies required. Only disadvantage is that it's unmodified NSZ so use '.\nsz.exe --help' to see how it work. You probably want to use it like '.\nsz.exe -C --level 22 --threads 8 "game.nsp"' to compress and '.\nsz.exe -D "game.nsz"' to decompress.

It's unfortunate @GnK23 still doesn't use executable build as they are much easier to install and have much better performance. At least next release of NSZ will come with such builds.
 
  • Like
Reactions: GnK23

ehassan

Member
Newcomer
Joined
Nov 2, 2019
Messages
8
Trophies
0
Age
44
XP
148
Country
Egypt
There is no rc.exe in your path. Check if you have the required file in C:\Program Files (x86)\Windows Kits\XX\bin\x64. (You will have to take a look which version you have installed. Substitute the XX for your version number)
Alternatively try looking under C:\Program Files (x86)\Windows Kits\10\bin\10.X.XXXXX.X\x64

Look for rc.exe and rcdll.dll. Copy them both to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\.
Also add C:\Program Files (x86)\Windows Kits\8.0\bin\x64 to your PATH variable.

Afterwards close any open command line window and open a new one.
Try again to install the missing library.

THX, it works fine now, I really appreciate your help.:)
 

ehassan

Member
Newcomer
Joined
Nov 2, 2019
Messages
8
Trophies
0
Age
44
XP
148
Country
Egypt
Honestly it might be easier to just use my experimental Windows executable build of NSZ from last Sunday: http://www.nicobosshard.ch/nsz/nsz_nuitka_17f153d_portable.zip
Just extract and it will work. No Python or any Dependencies required. Only disadvantage is that it's unmodified NSZ so use '.\nsz.exe --help' to see how it work. You probably want to use it like '.\nsz.exe -C --level 22 --threads 8 "game.nsp"' to compress and '.\nsz.exe -D "game.nsz"' to decompress.

It's unfortunate @GnK23 still doesn't use executable build as they are much easier to install and have much better performance. At least next release of NSZ will come with such builds.

I agree, it doesn't require any dependencies, I also like that I can select the output folder, which I couldn't find with Ryjin, and definitely I will use it for single files, but IDK if I can use it with batch of files, like Ryjin's automated process, I just add all NSPs in the folder, execute, go to sleep and it will be all compressed by the morning, then I spend some extra time to arrange each file into its folder. :)
 

nicoboss

Well-Known Member
Member
Joined
Feb 1, 2019
Messages
132
Trophies
0
Age
26
XP
1,196
Country
Switzerland
I agree, it doesn't require any dependencies, I also like that I can select the output folder, which I couldn't find with Ryjin, and definitely I will use it for single files, but IDK if I can use it with batch of files, like Ryjin's automated process, I just add all NSPs in the folder, execute, go to sleep and it will be all compressed by the morning, then I spend some extra time to arrange each file into its folder. :)
Just enter a folder path instead of a file name and it will progress the whole folder.
 
  • Like
Reactions: GnK23

GnK23

Well-Known Member
OP
Member
Joined
Apr 6, 2016
Messages
170
Trophies
0
Age
35
XP
671
Country
United States
Honestly it might be easier to just use my experimental Windows executable build of NSZ from last Sunday: http://www.nicobosshard.ch/nsz/nsz_nuitka_17f153d_portable.zip
Just extract and it will work. No Python or any Dependencies required. Only disadvantage is that it's unmodified NSZ so use '.\nsz.exe --help' to see how it work. You probably want to use it like '.\nsz.exe -C --level 22 --threads 8 "game.nsp"' to compress and '.\nsz.exe -D "game.nsz"' to decompress.

It's unfortunate @GnK23 still doesn't use executable build as they are much easier to install and have much better performance. At least next release of NSZ will come with such builds.
I'll see what I can do for the next release. Minor update for manual mode only. Both for the nsz.exe and the nsz.py version
 
Last edited by GnK23,

GnK23

Well-Known Member
OP
Member
Joined
Apr 6, 2016
Messages
170
Trophies
0
Age
35
XP
671
Country
United States
I agree, it doesn't require any dependencies, I also like that I can select the output folder, which I couldn't find with Ryjin, and definitely I will use it for single files, but IDK if I can use it with batch of files, like Ryjin's automated process, I just add all NSPs in the folder, execute, go to sleep and it will be all compressed by the morning, then I spend some extra time to arrange each file into its folder. :)
Ryjin 2.0 Final Portable https://gofile.io/?c=r08nvO
Changelog
- Now with custom input/output folder for nsp (manual mode only)

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

Latest update now at the first page. @nicoboss when will you release the delete function for the NSP?
 

nicoboss

Well-Known Member
Member
Joined
Feb 1, 2019
Messages
132
Trophies
0
Age
26
XP
1,196
Country
Switzerland
Hi,
i have implemented the delete function:
https://github.com/Taorni/nsz

You can just replace the nsz.py. Afterwards you can pass --remove-source to delete the source nsp or nsz file/s.

I also created a PR for the main repo. Maybe nicoboss will merge it.
Thanks a lot for inserting all the container close calls. Just create a pr and I will merge it.
 
  • Like
Reactions: lordelan and GnK23

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BigOnYa @ BigOnYa: Ok good chatting, I'm off to the bar, to shoot some pool, nighty night. +1