It sounds like you are looking for the software or "piece" of code used to convert files (or cartridge dumps) into the

: If your goal is to run a cartridge backup on a hacked Switch, keep it as XCI (mount via Atmosphère ’s nx‑mount or use Tinfoil ’s XCI installer). Converting to NSP offers no advantage and introduces extra steps.