public string Pack(ref sFolder unpacked, sFile file) { if (file.name.ToUpper().EndsWith(".LZS")) { return(LZS.Compress(unpacked.files[0].path, file.path, pluginHost)); } else if (file.name.ToUpper().EndsWith(".RESC")) { return(RESC.Pack(file.path, ref unpacked, pluginHost)); } return(null); }
public sFolder Unpack(sFile file) { if (file.name.ToUpper().EndsWith(".LZS")) { sFolder decompressed = new sFolder(); decompressed.files = new List <sFile>(); decompressed.files.Add(LZS.Decompress(file.path, pluginHost)); return(decompressed); } else if (file.name.ToUpper().EndsWith(".RESC")) { return(RESC.Unpack(file.path, pluginHost)); } return(new sFolder()); }