Esempio n. 1
0
        public override Stream OpenEntry(ArcFile arc, Entry entry)
        {
            var pent = entry as PackedEntry;

            if (null == pent || !pent.IsPacked)
            {
                return(base.OpenEntry(arc, entry));
            }
            var data = new byte[pent.UnpackedSize];

            using (var input = arc.File.CreateStream(entry.Offset, entry.Size))
                Cp2Reader.DecompressLz(input, data);
            return(new BinMemoryStream(data, entry.Name));
        }
Esempio n. 2
0
        public override ImageData Read(IBinaryStream file, ImageMetaData info)
        {
            var reader = new Cp2Reader(file, (Cp2MetaData)info);

            return(reader.Unpack());
        }