mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +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,14 +334,13 @@ public class PenumbraSqPackStream : IDisposable
|
|||
if( blockHeader.CompressedSize == 32000 )
|
||||
{
|
||||
dest.Write( Reader.ReadBytes( ( int )blockHeader.UncompressedSize ) );
|
||||
return blockHeader.UncompressedSize;
|
||||
}
|
||||
|
||||
var data = Reader.ReadBytes( ( int )blockHeader.CompressedSize );
|
||||
|
||||
using( var compressedStream = new MemoryStream( data ) )
|
||||
else
|
||||
{
|
||||
using var zlibStream = new DeflateStream( compressedStream, CompressionMode.Decompress );
|
||||
var data = Reader.ReadBytes( ( int )blockHeader.CompressedSize );
|
||||
|
||||
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