예제 #1
0
파일: ArcABMP.cs 프로젝트: zxc120/GARbro
        public override Stream OpenEntry(ArcFile arc, Entry entry)
        {
            if (0xFF435031 != arc.File.View.ReadUInt32(entry.Offset))
            {
                return(base.OpenEntry(arc, entry));
            }
            var data = arc.File.View.ReadBytes(entry.Offset, entry.Size);

            data = PackOpener.Decompress(data) ?? data;
            return(new BinMemoryStream(data, entry.Name));
        }
예제 #2
0
        public override Stream OpenEntry(ArcFile arc, Entry entry)
        {
            if (0xFF435031 != arc.File.View.ReadUInt32(entry.Offset))
            {
                return(base.OpenEntry(arc, entry));
            }
            var packed = new byte[entry.Size];

            arc.File.View.Read(entry.Offset, packed, 0, entry.Size);
            var unpacked = PackOpener.Decompress(packed);

            if (null == unpacked)
            {
                return(new MemoryStream(packed));
            }
            return(new MemoryStream(unpacked));
        }