diff --git a/DefaultPlugin/Network/NetworkProcessor.cs b/DefaultPlugin/Network/NetworkProcessor.cs index 80bb20bff..dd73c5ba7 100644 --- a/DefaultPlugin/Network/NetworkProcessor.cs +++ b/DefaultPlugin/Network/NetworkProcessor.cs @@ -1,11 +1,7 @@ using System; using System.Drawing; using System.IO; -#if __MonoCS__ using Ionic.Zlib; -#else -using System.IO.Compression; -#endif using System.Net; using System.Net.Sockets; using ClassicalSharp; @@ -248,19 +244,7 @@ namespace DefaultPlugin.Network { } receivedFirstPosition = false; gzipHeader = new GZipHeaderReader(); - // Workaround because built in mono stream assumes that the end of stream - // has been reached the first time a read call returns 0. (MS.NET doesn't) - #if __MonoCS__ gzipStream = new DeflateStream( gzippedMap, true ); - #else - gzipStream = new DeflateStream( gzippedMap, CompressionMode.Decompress ); - if( OpenTK.Configuration.RunningOnMono ) { - Utils.LogWarning( "You are running on Mono, but this build does not support the Mono workaround." ); - Utils.LogWarning( "You should either download the Mono compatible build or define '__MonoCS__' when targeting Mono. " + - "(The Mono compiler already defines this by default)" ); - Utils.LogWarning( "You will likely experience an 'Internal error (no progress possible) ReadInternal' exception when decompressing the map." ); - } - #endif mapSizeIndex = 0; mapIndex = 0; receiveStart = DateTime.UtcNow; diff --git a/Ionic.Zlib/DeflateStream.cs b/Ionic.Zlib/DeflateStream.cs index 481569fbd..7d519f95a 100644 --- a/Ionic.Zlib/DeflateStream.cs +++ b/Ionic.Zlib/DeflateStream.cs @@ -1,13 +1,12 @@ // Originally copyright (c) 2009 Dino Chiesa and Microsoft Corporation. // All rights reserved. // See license.txt, section Ionic.Zlib license -#if __MonoCS__ using System; using System.IO; namespace Ionic.Zlib { - internal class DeflateStream { + public class DeflateStream { ZlibCodec z; bool _leaveOpen; @@ -71,5 +70,4 @@ namespace Ionic.Zlib { return count - z.AvailableBytesOut; } } -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/Ionic.Zlib/InfTree.cs b/Ionic.Zlib/InfTree.cs index aed643314..f75cf8743 100644 --- a/Ionic.Zlib/InfTree.cs +++ b/Ionic.Zlib/InfTree.cs @@ -1,7 +1,6 @@ // Originally copyright (c) 2009 Dino Chiesa and Microsoft Corporation. // All rights reserved. // See license.txt, section Ionic.Zlib license -#if __MonoCS__ using System; namespace Ionic.Zlib { @@ -292,5 +291,4 @@ namespace Ionic.Zlib { return (int)( (uint)value >> bits ); } } -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/Ionic.Zlib/Inflate.cs b/Ionic.Zlib/Inflate.cs index 67408b135..4db5c58b3 100644 --- a/Ionic.Zlib/Inflate.cs +++ b/Ionic.Zlib/Inflate.cs @@ -1,7 +1,6 @@ // Originally copyright (c) 2009 Dino Chiesa and Microsoft Corporation. // All rights reserved. // See license.txt, section Ionic.Zlib license -#if __MonoCS__ using System; using System.IO; @@ -977,5 +976,4 @@ namespace Ionic.Zlib return RCode.StreamEnd; } } -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/Ionic.Zlib/ZlibCodec.cs b/Ionic.Zlib/ZlibCodec.cs index b20aaf1c5..795475611 100644 --- a/Ionic.Zlib/ZlibCodec.cs +++ b/Ionic.Zlib/ZlibCodec.cs @@ -1,7 +1,6 @@ // Originally copyright (c) 2009 Dino Chiesa and Microsoft Corporation. // All rights reserved. // See license.txt, section Ionic.Zlib license -#if __MonoCS__ using System; namespace Ionic.Zlib { @@ -40,5 +39,4 @@ namespace Ionic.Zlib { public const int DataError = -3; public const int BufferError = -5; } -} -#endif \ No newline at end of file +} \ No newline at end of file