replaced ZLibNet with .Net DeflateStream class.

This commit is contained in:
morkt
2015-07-28 12:20:20 +04:00
parent 8eea67faee
commit 002298bb93
21 changed files with 51 additions and 61 deletions

View File

@@ -26,8 +26,8 @@
using System.ComponentModel.Composition;
using System.IO;
using System.Text;
using GameRes.Compression;
using GameRes.Utility;
using ZLibNet;
namespace GameRes.Formats.ScenePlayer
{
@@ -50,10 +50,6 @@ namespace GameRes.Formats.ScenePlayer
int first = stream.ReadByte() ^ 0x21;
if (first != 0x78) // doesn't look like zlib stream
return null;
int flg = stream.ReadByte() ^ 0x21;
int fcheck = first << 8 | flg;
if (fcheck % 0x1f != 0)
return null;
stream.Position = 0;
using (var input = new XoredStream (stream, 0x21, true))