Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ local.properties

## TODO: If you have NuGet Package Restore enabled, uncomment this
packages/
.vs

# Visual C++ cache files
ipch/
Expand Down
2 changes: 1 addition & 1 deletion src/Zlib.Portable.Tests/Zlib.Portable.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Zlib.Portable\Zlib.Portable.csproj">
<Project>{ad1688bf-75a9-4c42-b6d0-40aa3b28a102}</Project>
<Project>{3c86e513-9e86-4f6f-aa04-1f4408f2f6c0}</Project>
<Name>Zlib.Portable</Name>
</ProjectReference>
</ItemGroup>
Expand Down
23 changes: 13 additions & 10 deletions src/Zlib.Portable.sln
Original file line number Diff line number Diff line change
@@ -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}"
Expand All @@ -14,27 +12,32 @@ 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
Release|Any CPU = Release|Any CPU
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
1 change: 0 additions & 1 deletion src/Zlib.Portable/CRC32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@


using System;
using Interop = System.Runtime.InteropServices;

namespace Ionic.Crc
{
Expand Down
2 changes: 0 additions & 2 deletions src/Zlib.Portable/Iso8859Dash1Encoding.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Ionic.Encoding
{
Expand Down
5 changes: 4 additions & 1 deletion src/Zlib.Portable/ParallelDeflateOutputStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
using System;
using System.Collections.Generic;
using System.Threading;
using Ionic.Zlib;
using System.IO;


Expand Down Expand Up @@ -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.
/// </remarks>
#if NETSTANDARD2_0
public override void Close()
#else
public void Close()
#endif
{
TraceOutput(TraceBits.Session, "Close {0:X8}", this.GetHashCode());

Expand Down
17 changes: 7 additions & 10 deletions src/Zlib.Portable/Path.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down Expand Up @@ -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;

Expand All @@ -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' };
Expand All @@ -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;
}
Expand Down
29 changes: 0 additions & 29 deletions src/Zlib.Portable/Properties/AssemblyInfo.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/Zlib.Portable/Tree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
// -----------------------------------------------------------------------


using System;

namespace Ionic.Zlib
{
Expand Down
135 changes: 35 additions & 100 deletions src/Zlib.Portable/Zlib.Portable.csproj
Original file line number Diff line number Diff line change
@@ -1,113 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AD1688BF-75A9-4C42-B6D0-40AA3B28A102}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Ionic.Zlib</RootNamespace>
<TargetFrameworks>.NETPortable,Version=v4.0,Profile=Profile328;netstandard2.0</TargetFrameworks>
<AssemblyName>Zlib.Portable</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<RootNamespace>Ionic.Zlib</RootNamespace>
<Authors>Dino Chiesa</Authors>
<Product>DotNetZip Library</Product>
<Description>Library for Deflate and ZLIB compression. http://www.codeplex.com/DotNetZip</Description>
<Copyright>Copyright © 2006-2011 Dino Chiesa. Ported by Robert McLaws.</Copyright>
<AssemblyVersion>1.11.0.0</AssemblyVersion>
<FileVersion>1.11.0.0</FileVersion>
<SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>Zlib.Portable.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == '.NETPortable,Version=v4.0,Profile=Profile328'">
<TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
<TargetFrameworkVersion>4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile328</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>4.0</OldToolsVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<ItemGroup Condition="'$(TargetFramework)'=='.NETPortable,Version=v4.0,Profile=Profile328'">
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Zlib.Portable.xml</DocumentationFile>
<DocumentationFile></DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\Zlib.Portable.xml</DocumentationFile>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|.NETPortable,Version=v4.0,Profile=Profile328|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-Signed|AnyCPU'">
<OutputPath>bin\Release-Signed\</OutputPath>
<DefineConstants>TRACE;SIGNED</DefineConstants>
<DocumentationFile>bin\Release-Signed\Zlib.Portable.xml</DocumentationFile>
<Optimize>true</Optimize>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|.NETPortable,Version=v4.0,Profile=Profile328|AnyCPU'">
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AssemblyOriginatorKeyFile>..\Zlib.Portable.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Compile Include="CRC32.cs" />
<Compile Include="Deflate.cs" />
<Compile Include="DeflateStream.cs" />
<Compile Include="GZipStream.cs" />
<Compile Include="Inflate.cs" />
<Compile Include="InfTree.cs" />
<Compile Include="Iso8859Dash1Encoding.cs" />
<Compile Include="ParallelDeflateOutputStream.cs" />
<Compile Include="Path.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tree.cs" />
<Compile Include="Zlib.cs" />
<Compile Include="ZlibBaseStream.cs" />
<Compile Include="ZlibCodec.cs" />
<Compile Include="ZlibConstants.cs" />
<Compile Include="ZlibStream.cs" />
<None Include="..\Zlib.Portable.snk" Link="Zlib.Portable.snk" />
</ItemGroup>

<ItemGroup>
<None Include="..\Zlib.Portable.snk">
<Link>Zlib.Portable.snk</Link>
</None>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>
2 changes: 0 additions & 2 deletions src/Zlib.Portable/Zlib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@



using System;
using Interop=System.Runtime.InteropServices;

namespace Ionic.Zlib
{
Expand Down
5 changes: 4 additions & 1 deletion src/Zlib.Portable/ZlibBaseStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/Zlib.Portable/ZlibCodec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@


using System;
using Interop=System.Runtime.InteropServices;

namespace Ionic.Zlib
{
Expand Down
1 change: 0 additions & 1 deletion src/Zlib.Portable/ZlibConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
// -----------------------------------------------------------------------


using System;

namespace Ionic.Zlib
{
Expand Down