diff --git a/.gitignore b/.gitignore
index 5701c20..89630db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,6 +68,7 @@ local.properties
## TODO: If you have NuGet Package Restore enabled, uncomment this
packages/
+.vs
# Visual C++ cache files
ipch/
diff --git a/src/Zlib.Portable.Tests/Zlib.Portable.Tests.csproj b/src/Zlib.Portable.Tests/Zlib.Portable.Tests.csproj
index 5bc47a6..96b5b4a 100644
--- a/src/Zlib.Portable.Tests/Zlib.Portable.Tests.csproj
+++ b/src/Zlib.Portable.Tests/Zlib.Portable.Tests.csproj
@@ -66,7 +66,7 @@
- {ad1688bf-75a9-4c42-b6d0-40aa3b28a102}
+ {3c86e513-9e86-4f6f-aa04-1f4408f2f6c0}
Zlib.Portable
diff --git a/src/Zlib.Portable.sln b/src/Zlib.Portable.sln
index 2210e8a..50ecd43 100644
--- a/src/Zlib.Portable.sln
+++ b/src/Zlib.Portable.sln
@@ -1,10 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.31101.0
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.168
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zlib.Portable", "Zlib.Portable\Zlib.Portable.csproj", "{AD1688BF-75A9-4C42-B6D0-40AA3B28A102}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zlib.Portable.Tests", "Zlib.Portable.Tests\Zlib.Portable.Tests.csproj", "{047A98B2-BC96-41B4-ADD8-2167FB1B6502}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B13F1B3E-9129-49E1-BD89-028F6BB95EE3}"
@@ -14,6 +12,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Zlib.Portable.Signed.nuspec = Zlib.Portable.Signed.nuspec
EndProjectSection
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zlib.Portable", "Zlib.Portable\Zlib.Portable.csproj", "{3C86E513-9E86-4F6F-AA04-1F4408F2F6C0}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,20 +21,23 @@ Global
Release-Signed|Any CPU = Release-Signed|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {AD1688BF-75A9-4C42-B6D0-40AA3B28A102}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {AD1688BF-75A9-4C42-B6D0-40AA3B28A102}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AD1688BF-75A9-4C42-B6D0-40AA3B28A102}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AD1688BF-75A9-4C42-B6D0-40AA3B28A102}.Release|Any CPU.Build.0 = Release|Any CPU
- {AD1688BF-75A9-4C42-B6D0-40AA3B28A102}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU
- {AD1688BF-75A9-4C42-B6D0-40AA3B28A102}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU
{047A98B2-BC96-41B4-ADD8-2167FB1B6502}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{047A98B2-BC96-41B4-ADD8-2167FB1B6502}.Debug|Any CPU.Build.0 = Debug|Any CPU
{047A98B2-BC96-41B4-ADD8-2167FB1B6502}.Release|Any CPU.ActiveCfg = Release|Any CPU
{047A98B2-BC96-41B4-ADD8-2167FB1B6502}.Release|Any CPU.Build.0 = Release|Any CPU
{047A98B2-BC96-41B4-ADD8-2167FB1B6502}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU
{047A98B2-BC96-41B4-ADD8-2167FB1B6502}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU
+ {3C86E513-9E86-4F6F-AA04-1F4408F2F6C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3C86E513-9E86-4F6F-AA04-1F4408F2F6C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3C86E513-9E86-4F6F-AA04-1F4408F2F6C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3C86E513-9E86-4F6F-AA04-1F4408F2F6C0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3C86E513-9E86-4F6F-AA04-1F4408F2F6C0}.Release-Signed|Any CPU.ActiveCfg = Release|Any CPU
+ {3C86E513-9E86-4F6F-AA04-1F4408F2F6C0}.Release-Signed|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {FB6DF8EE-1E1F-4EAA-A870-8698AFEC83AF}
+ EndGlobalSection
EndGlobal
diff --git a/src/Zlib.Portable/CRC32.cs b/src/Zlib.Portable/CRC32.cs
index 5aba636..8f5bdc8 100644
--- a/src/Zlib.Portable/CRC32.cs
+++ b/src/Zlib.Portable/CRC32.cs
@@ -27,7 +27,6 @@
using System;
-using Interop = System.Runtime.InteropServices;
namespace Ionic.Crc
{
diff --git a/src/Zlib.Portable/Iso8859Dash1Encoding.cs b/src/Zlib.Portable/Iso8859Dash1Encoding.cs
index b182de8..9b12fa1 100644
--- a/src/Zlib.Portable/Iso8859Dash1Encoding.cs
+++ b/src/Zlib.Portable/Iso8859Dash1Encoding.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Text;
namespace Ionic.Encoding
{
diff --git a/src/Zlib.Portable/ParallelDeflateOutputStream.cs b/src/Zlib.Portable/ParallelDeflateOutputStream.cs
index 92eb8d7..cf2a628 100644
--- a/src/Zlib.Portable/ParallelDeflateOutputStream.cs
+++ b/src/Zlib.Portable/ParallelDeflateOutputStream.cs
@@ -27,7 +27,6 @@
using System;
using System.Collections.Generic;
using System.Threading;
-using Ionic.Zlib;
using System.IO;
@@ -740,7 +739,11 @@ public override void Flush()
/// You must call Close on the stream to guarantee that all of the data written in has
/// been compressed, and the compressed data has been written out.
///
+#if NETSTANDARD2_0
+ public override void Close()
+#else
public void Close()
+#endif
{
TraceOutput(TraceBits.Session, "Close {0:X8}", this.GetHashCode());
diff --git a/src/Zlib.Portable/Path.cs b/src/Zlib.Portable/Path.cs
index ba2203a..ca0af92 100644
--- a/src/Zlib.Portable/Path.cs
+++ b/src/Zlib.Portable/Path.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace System.IO
+namespace System.IO
{
public static class Path2
{
@@ -42,11 +37,11 @@ public static class Path2
internal readonly static int MaxPath;
- private readonly static int MaxDirectoryLength;
+ //private readonly static int MaxDirectoryLength;
internal readonly static int MaxLongPath;
- private readonly static string Prefix;
+ //private readonly static string Prefix;
private readonly static char[] s_Base32Char;
@@ -56,7 +51,9 @@ static Path2()
Path2.AltDirectorySeparatorChar = '/';
Path2.VolumeSeparatorChar = ':';
char[] chrArray = new char[] { '\"', '<', '>', '|', '\0', '\u0001', '\u0002', '\u0003', '\u0004', '\u0005', '\u0006', '\a', '\b', '\t', '\n', '\v', '\f', '\r', '\u000E', '\u000F', '\u0010', '\u0011', '\u0012', '\u0013', '\u0014', '\u0015', '\u0016', '\u0017', '\u0018', '\u0019', '\u001A', '\u001B', '\u001C', '\u001D', '\u001E', '\u001F' };
+#pragma warning disable CS0618
Path2.InvalidPathChars = chrArray;
+#pragma warning restore CS0618
char[] chrArray1 = new char[] { '\t', '\n', '\v', '\f', '\r', ' ', '\u0085', '\u00A0' };
Path2.TrimEndChars = chrArray1;
char[] chrArray2 = new char[] { '\"', '<', '>', '|', '\0', '\u0001', '\u0002', '\u0003', '\u0004', '\u0005', '\u0006', '\a', '\b', '\t', '\n', '\v', '\f', '\r', '\u000E', '\u000F', '\u0010', '\u0011', '\u0012', '\u0013', '\u0014', '\u0015', '\u0016', '\u0017', '\u0018', '\u0019', '\u001A', '\u001B', '\u001C', '\u001D', '\u001E', '\u001F' };
@@ -65,9 +62,9 @@ static Path2()
Path2.InvalidFileNameChars = chrArray3;
Path2.PathSeparator = ';';
Path2.MaxPath = 260;
- Path2.MaxDirectoryLength = 255;
+ //Path2.MaxDirectoryLength = 255;
Path2.MaxLongPath = 32000;
- Path2.Prefix = "\\\\?\\";
+ //Path2.Prefix = "\\\\?\\";
char[] chrArray4 = new char[] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5' };
Path2.s_Base32Char = chrArray4;
}
diff --git a/src/Zlib.Portable/Properties/AssemblyInfo.cs b/src/Zlib.Portable/Properties/AssemblyInfo.cs
deleted file mode 100644
index fac51f3..0000000
--- a/src/Zlib.Portable/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System.Resources;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Zlib.Portable")]
-[assembly: AssemblyDescription("Library for Deflate and ZLIB compression. http://www.codeplex.com/DotNetZip")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Dino Chiesa")]
-[assembly: AssemblyProduct("DotNetZip Library")]
-[assembly: AssemblyCopyright("Copyright © 2006-2011 Dino Chiesa. Ported by Robert McLaws.")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-[assembly: NeutralResourcesLanguage("en")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.11.0.0")]
-[assembly: AssemblyFileVersion("1.11.0.0")]
diff --git a/src/Zlib.Portable/Tree.cs b/src/Zlib.Portable/Tree.cs
index 1db8c4f..3d35e8f 100644
--- a/src/Zlib.Portable/Tree.cs
+++ b/src/Zlib.Portable/Tree.cs
@@ -61,7 +61,6 @@
// -----------------------------------------------------------------------
-using System;
namespace Ionic.Zlib
{
diff --git a/src/Zlib.Portable/Zlib.Portable.csproj b/src/Zlib.Portable/Zlib.Portable.csproj
index 8111fff..e007d54 100644
--- a/src/Zlib.Portable/Zlib.Portable.csproj
+++ b/src/Zlib.Portable/Zlib.Portable.csproj
@@ -1,113 +1,48 @@
-
-
-
+
+
- 10.0
- Debug
- AnyCPU
- {AD1688BF-75A9-4C42-B6D0-40AA3B28A102}
- Library
- Properties
- Ionic.Zlib
+ .NETPortable,Version=v4.0,Profile=Profile328;netstandard2.0
Zlib.Portable
- v4.0
+ Ionic.Zlib
+ Dino Chiesa
+ DotNetZip Library
+ Library for Deflate and ZLIB compression. http://www.codeplex.com/DotNetZip
+ Copyright © 2006-2011 Dino Chiesa. Ported by Robert McLaws.
+ 1.11.0.0
+ 1.11.0.0
+ false
+ Zlib.Portable.snk
+ false
+
+
+
+ .NETPortable
+ 4.0
Profile328
- 512
- {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
-
-
-
-
- 4.0
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
-
- true
- full
- false
- bin\Debug\
+
+
+
+
+
DEBUG;TRACE
- prompt
- 4
- bin\Debug\Zlib.Portable.xml
+
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- bin\Release\Zlib.Portable.xml
+
+ full
+ true
-
- bin\Release-Signed\
- TRACE;SIGNED
- bin\Release-Signed\Zlib.Portable.xml
- true
+
pdbonly
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
- ..\Zlib.Portable.snk
- true
+ true
+
-
-
- False
- .NET Framework 3.5 SP1 Client Profile
- false
-
-
- False
- .NET Framework 3.5 SP1
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
- Zlib.Portable.snk
-
+
-
-
-
\ No newline at end of file
+
+
diff --git a/src/Zlib.Portable/Zlib.cs b/src/Zlib.Portable/Zlib.cs
index e1ce6d4..a828981 100644
--- a/src/Zlib.Portable/Zlib.cs
+++ b/src/Zlib.Portable/Zlib.cs
@@ -88,8 +88,6 @@
-using System;
-using Interop=System.Runtime.InteropServices;
namespace Ionic.Zlib
{
diff --git a/src/Zlib.Portable/ZlibBaseStream.cs b/src/Zlib.Portable/ZlibBaseStream.cs
index 72f0460..d9c0c7e 100644
--- a/src/Zlib.Portable/ZlibBaseStream.cs
+++ b/src/Zlib.Portable/ZlibBaseStream.cs
@@ -267,8 +267,11 @@ private void end()
_z = null;
}
-
+#if NETSTANDARD2_0
+ public override void Close()
+#else
public void Close()
+#endif
{
if (_stream == null) return;
try
diff --git a/src/Zlib.Portable/ZlibCodec.cs b/src/Zlib.Portable/ZlibCodec.cs
index ef60007..77dfff3 100644
--- a/src/Zlib.Portable/ZlibCodec.cs
+++ b/src/Zlib.Portable/ZlibCodec.cs
@@ -65,7 +65,6 @@
using System;
-using Interop=System.Runtime.InteropServices;
namespace Ionic.Zlib
{
diff --git a/src/Zlib.Portable/ZlibConstants.cs b/src/Zlib.Portable/ZlibConstants.cs
index 59ae730..31506b4 100644
--- a/src/Zlib.Portable/ZlibConstants.cs
+++ b/src/Zlib.Portable/ZlibConstants.cs
@@ -61,7 +61,6 @@
// -----------------------------------------------------------------------
-using System;
namespace Ionic.Zlib
{