actually remove IonicZipWriter instead of not compiling it
This commit is contained in:
parent
e0df266cb7
commit
1ef5c2083f
|
@ -22,7 +22,6 @@
|
|||
<!--<Reference Include="System.Xml.Linq" />-->
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!--<PackageReference Include="Ionic.Zip" Version="1.9.1.8" PrivateAssets="All" />--><!-- only used in IonicZipWriter.cs, unused and removed from compilation -->
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" PrivateAssets="All" />
|
||||
<Reference Include="NLua"
|
||||
HintPath="$(SolutionDir)output/dll/nlua/NLua.dll"
|
||||
|
@ -37,7 +36,6 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="$(SolutionDir)Version/svnrev.cs" />
|
||||
<Compile Include="$(SolutionDir)Version/VersionInfo.cs" />
|
||||
<Compile Remove="IonicZipWriter.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="movie/bk2/Bk2Movie.HeaderApi.cs" DependentUpon="Bk2Movie.cs" />
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
using Ionic.Zip;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public class IonicZipWriter : IZipWriter
|
||||
{
|
||||
private readonly int _level;
|
||||
private ZipOutputStream _zipOutputStream;
|
||||
|
||||
public IonicZipWriter(string path, int compressionlevel)
|
||||
{
|
||||
_level = compressionlevel;
|
||||
_zipOutputStream = new ZipOutputStream(path)
|
||||
{
|
||||
EnableZip64 = Zip64Option.Never,
|
||||
CompressionLevel = (Ionic.Zlib.CompressionLevel)_level,
|
||||
CompressionMethod = CompressionMethod.Deflate
|
||||
};
|
||||
}
|
||||
|
||||
public void WriteItem(string name, Action<Stream> callback)
|
||||
{
|
||||
var e = _zipOutputStream.PutNextEntry(name);
|
||||
e.CompressionMethod = _level == 0
|
||||
? CompressionMethod.None
|
||||
: CompressionMethod.Deflate;
|
||||
|
||||
callback(_zipOutputStream); // there is no CloseEntry() call
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_zipOutputStream != null)
|
||||
{
|
||||
_zipOutputStream.Dispose();
|
||||
_zipOutputStream = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue