mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-06 05:38:48 +08:00
Fix partial reads from ZstdSharp.DecompressionStream.Read for Nexas.ArcPac
This commit is contained in:
@@ -316,7 +316,13 @@ namespace GameRes.Formats.NeXAS
|
||||
using (var ds = new ZstdSharp.DecompressionStream (s))
|
||||
{
|
||||
var dst = new byte[unpackedSize];
|
||||
ds.Read (dst, 0, dst.Length);
|
||||
int decompressedSize = 0;
|
||||
|
||||
while(decompressedSize < unpackedSize)
|
||||
{
|
||||
decompressedSize += ds.Read(dst, decompressedSize, (int)unpackedSize - decompressedSize);
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user