Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }