Skip to content

Commit

Permalink
fix dotnet 3.5 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
rms80 committed May 25, 2018
1 parent d7912e9 commit 64fd259
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/BufferUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,11 @@ static public byte[] ToBytes(double[] array)
static public byte[] CompressZLib(byte[] buffer, bool bFast)
{
MemoryStream ms = new MemoryStream();
#if G3_USING_UNITY && (NET_2_0 || NET_2_0_SUBSET)
DeflateStream zip = new DeflateStream(ms, CompressionMode.Compress);
#else
DeflateStream zip = new DeflateStream(ms, (bFast) ? CompressionLevel.Fastest : CompressionLevel.Optimal, true);
#endif
zip.Write(buffer, 0, buffer.Length);
zip.Close();
ms.Position = 0;
Expand Down

0 comments on commit 64fd259

Please sign in to comment.