mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 15:44: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.Collections.Generic;
|
||||||
using System.ComponentModel.Composition;
|
using System.ComponentModel.Composition;
|
||||||
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using GameRes.Compression;
|
||||||
using GameRes.Utility;
|
using GameRes.Utility;
|
||||||
|
|
||||||
namespace GameRes.Formats.KiriKiri
|
namespace GameRes.Formats.KiriKiri
|
||||||
@ -85,5 +87,13 @@ namespace GameRes.Formats.KiriKiri
|
|||||||
throw new InvalidFormatException();
|
throw new InvalidFormatException();
|
||||||
return Binary.BigEndian (input.ReadUInt32());
|
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