mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
Add kirikiri XPK uncompress support
This commit is contained in:
parent
4fad98038f
commit
6855967b04
@ -25,7 +25,9 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using GameRes.Compression;
|
||||
using GameRes.Utility;
|
||||
|
||||
namespace GameRes.Formats.KiriKiri
|
||||
@ -85,5 +87,13 @@ namespace GameRes.Formats.KiriKiri
|
||||
throw new InvalidFormatException();
|
||||
return Binary.BigEndian (input.ReadUInt32());
|
||||
}
|
||||
|
||||
public override Stream OpenEntry(ArcFile arc, Entry entry)
|
||||
{
|
||||
PackedEntry packed_entry = entry as PackedEntry;
|
||||
if (null == packed_entry || packed_entry.Size == packed_entry.UnpackedSize)
|
||||
return arc.File.CreateStream(entry.Offset, entry.Size);
|
||||
return new ZLibStream(arc.File.CreateStream(entry.Offset, entry.Size), CompressionMode.Decompress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user