public void DecompressXCIZ(string nspzFile) { var nspzFileNoExtension = Path.GetFileNameWithoutExtension(nspzFile); Out.Event($"Task DecompressXCIZ \"{nspzFileNoExtension}\" started\r\n"); var keyset = ProcessKeyset.OpenKeyset(); ProcessNsp.Decompress(nspzFile, decryptedDir, Out); UntrimAndEncrypt(keyset); var nspOutPath = Path.Combine(OutputFolderPath, nspzFileNoExtension); var encryptedDirFs = new LocalFileSystem(encryptedDir); FolderTools.FolderToXCI(encryptedDirFs, $"{nspOutPath}.xci", keyset); Out.Event($"Task DecompressXCIZ \"{nspzFileNoExtension}\" completed!\r\n"); }
public void DecompressNSPZ(string nspzFile) { var nspzFileNoExtension = Path.GetFileNameWithoutExtension(nspzFile); Out.Event($"Task DecompressNSPZ \"{nspzFileNoExtension}\" started\r\n"); var keyset = ProcessKeyset.OpenKeyset(); ProcessNsp.Decompress(nspzFile, decryptedDir, Out); UntrimAndEncrypt(keyset); var nspOutPath = Path.Combine(OutputFolderPath, nspzFileNoExtension); var encryptedDirFs = new LocalFileSystem(encryptedDir); var OutputFolderPathFs = new LocalFileSystem(OutputFolderPath); using (var outFile = FolderTools.CreateOrOverwriteFileOpen(OutputFolderPathFs, $"{nspzFileNoExtension}.nsp")) { FolderTools.FolderToNSP(encryptedDirFs, outFile); } Out.Event($"Task DecompressNSPZ \"{nspzFileNoExtension}\" completed!\r\n"); }
public static void ExtractPfsHfs(string inFile, string outDirPath, Keyset keyset, Output Out) { var inFileExtension = Path.GetExtension(inFile).ToLower(); switch (inFileExtension) { case ".nsp": ProcessNsp.Extract(inFile, outDirPath, Out); break; case ".xci": ProcessXci.Extract(inFile, outDirPath, keyset, Out); break; case ".nspz": case ".xciz": ProcessNsp.Decompress(inFile, outDirPath, Out); break; default: throw new NotImplementedException(); } }