mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(AosOpener): use HuffmanStream.
This commit is contained in:
parent
9b9d91a954
commit
2bdfc873b6
@ -28,6 +28,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using GameRes.Compression;
|
||||
|
||||
namespace GameRes.Formats.Lilim
|
||||
{
|
||||
@ -94,12 +95,9 @@ namespace GameRes.Formats.Lilim
|
||||
return base.OpenEntry (arc, entry);
|
||||
|
||||
aent.UnpackedSize = arc.File.View.ReadUInt32 (entry.Offset);
|
||||
var packed = arc.File.View.ReadBytes (entry.Offset+4, entry.Size-4);
|
||||
var unpacked = new byte[aent.UnpackedSize];
|
||||
|
||||
var decoder = new HuffmanDecoder (packed, unpacked);
|
||||
decoder.Unpack();
|
||||
return new BinMemoryStream (unpacked, entry.Name);
|
||||
var packed = arc.File.CreateStream (entry.Offset+4, entry.Size-4);
|
||||
var unpacked = new HuffmanStream (packed);
|
||||
return new LimitStream (unpacked, aent.UnpackedSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user