mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Merge pull request #250 from Soreepeong/fix/sqpackstream-readfileblock
Fix ReadFileBlock (NotAdam/Lumina#42)
This commit is contained in:
commit
93b11fb705
1 changed files with 5 additions and 6 deletions
|
|
@ -334,13 +334,12 @@ public class PenumbraSqPackStream : IDisposable
|
|||
if( blockHeader.CompressedSize == 32000 )
|
||||
{
|
||||
dest.Write( Reader.ReadBytes( ( int )blockHeader.UncompressedSize ) );
|
||||
return blockHeader.UncompressedSize;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
var data = Reader.ReadBytes( ( int )blockHeader.CompressedSize );
|
||||
|
||||
using( var compressedStream = new MemoryStream( data ) )
|
||||
{
|
||||
using var compressedStream = new MemoryStream( data );
|
||||
using var zlibStream = new DeflateStream( compressedStream, CompressionMode.Decompress );
|
||||
zlibStream.CopyTo( dest );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue