Homebrew NSP to NSZ - C++

snuffbot1

Well-Known Member
Member
Joined
Aug 21, 2026
Messages
107
Reaction score
87
Trophies
0
Age
60
XP
141
Country
United Kingdom
Here you go, a very small c++ version for converting nsp files to nsz and back again. Source code and exe are in the zip.

Example useage:
Flag Meaning
-C / -D Compress NSP→NSZ or decompress NSZ→NSP
-F Re-pad the PFS0 header to 0x20 alignment
-L zstd long-distance matching
-S / -B Solid stream (default) or block stream
-l N zstd level (default 18)
-s N Block size exponent 14..=32 (default 20)
-o DIR Output directory
-k PATH prod.keys (default ~/.switch/prod.keys)
-x Skip CRC32 check of known keys
-K, -P Accepted for nsz compatibility, no-op


Example compress/decompress nsp

nszrs -C -B -k prod.keys -s 20 -o out/ game.nsp
nszrs -D -F -k prod.keys -o out/ /out/game.nsz
nszrs -C -L -o out/ game.nsp

This is a command line tool, at some point I might make a gui, there's no xci conversion yet and I doubt I'll add it. I just made it for my own personal use but feel free to mod/share or whatever you want. It's called nszrs as I found some rust code version on the net and then converted it to c++ for my own use.
 

Attachments

  • Like
Reactions: LuigiGad

Site & Scene News