public override Stream OpenEntry(ArcFile arc, Entry entry) { var data = arc.File.View.ReadBytes(entry.Offset, entry.Size); DecryptData(data, DefaultKey); if (Binary.AsciiEqual(data, "PSS0")) { data = CpzOpener.UnpackLzss(data); } return(new BinMemoryStream(data, entry.Name)); }
public override Stream OpenEntry(ArcFile arc, Entry entry) { var cent = entry as CpzEntry; if (null == cent) { return(base.OpenEntry(arc, entry)); } var data = arc.File.View.ReadBytes(entry.Offset, entry.Size); DecryptData(data, cent.Key); if (Binary.AsciiEqual(data, "PSS0")) { data = CpzOpener.UnpackLzss(data); } return(new BinMemoryStream(data, entry.Name)); }