switch back to Mono implementation for GZip

This commit is contained in:
Philipp Crocoll 2016-01-11 21:57:54 +01:00
parent 8fc98df53b
commit 82b288ae71
6 changed files with 7 additions and 11 deletions

View File

@ -162,10 +162,6 @@
<Project>{70D3844A-D9FA-4A64-B205-A84C6A822196}</Project>
<Name>KP2AKdbLibraryBinding</Name>
</ProjectReference>
<ProjectReference Include="..\ZlibAndroid\ZlibAndroid.csproj">
<Project>{6C29A7E7-E016-4FC1-B1A0-DEE26AC711BB}</Project>
<Name>ZlibAndroid</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
<Import Project="..\packages\Xamarin.Insights.1.11.3\build\MonoAndroid10\Xamarin.Insights.targets" Condition="Exists('..\packages\Xamarin.Insights.1.11.3\build\MonoAndroid10\Xamarin.Insights.targets')" />

View File

@ -114,7 +114,7 @@ namespace KeePassLib.Serialization
!m_bRepairMode);
if(m_pwDatabase.Compression == PwCompressionAlgorithm.GZip)
readerStream = new Ionic.Zlib.GZipStream(sHashed, Ionic.Zlib.CompressionMode.Decompress);
readerStream = new GZipStream(sHashed, CompressionMode.Decompress);
else readerStream = sHashed;
}
else if(kdbFormat == KdbxFormat.PlainXml)

View File

@ -115,7 +115,7 @@ namespace KeePassLib.Serialization
Stream sHashed = new HashedBlockStream(sEncrypted, true);
if(m_pwDatabase.Compression == PwCompressionAlgorithm.GZip)
writerStream = new Ionic.Zlib.GZipStream(sHashed, Ionic.Zlib.CompressionMode.Compress);
writerStream = new GZipStream(sHashed, CompressionMode.Compress);
else
writerStream = sHashed;
}

View File

@ -103,7 +103,7 @@ namespace KeePassLib.Translation
FileAccess.Write, FileShare.None);
#if !KeePassLibSD
Ionic.Zlib.GZipStream gz = new Ionic.Zlib.GZipStream(fs, Ionic.Zlib.CompressionMode.Compress);
GZipStream gz = new GZipStream(fs, CompressionMode.Compress);
#else
GZipOutputStream gz = new GZipOutputStream(fs);
#endif
@ -132,7 +132,7 @@ namespace KeePassLib.Translation
FileAccess.Read, FileShare.Read);
#if !KeePassLibSD
Ionic.Zlib.GZipStream gz = new Ionic.Zlib.GZipStream(fs, Ionic.Zlib.CompressionMode.Decompress);
GZipStream gz = new GZipStream(fs, CompressionMode.Decompress);
#else
GZipInputStream gz = new GZipInputStream(fs);
#endif

View File

@ -68,7 +68,7 @@ namespace KeePassLib.Utility
FileStream fsOut = new FileStream(strPath, FileMode.Create,
FileAccess.Write, FileShare.None);
Ionic.Zlib.GZipStream gz = new Ionic.Zlib.GZipStream(fsOut, CompressionMode.Compress);
GZipStream gz = new GZipStream(fsOut, CompressionMode.Compress);
m_swOut = new StreamWriter(gz);
AppLogEx.Log("Started logging on " + dtNow.ToString("s") + ".");

View File

@ -430,7 +430,7 @@ namespace KeePassLib.Utility
if(pbData.Length == 0) return pbData;
MemoryStream msCompressed = new MemoryStream();
Ionic.Zlib.GZipStream gz = new Ionic.Zlib.GZipStream(msCompressed, Ionic.Zlib.CompressionMode.Compress);
GZipStream gz = new GZipStream(msCompressed, CompressionMode.Compress);
MemoryStream msSource = new MemoryStream(pbData, false);
MemUtil.CopyStream(msSource, gz);
gz.Close();
@ -447,7 +447,7 @@ namespace KeePassLib.Utility
if(pbCompressed.Length == 0) return pbCompressed;
MemoryStream msCompressed = new MemoryStream(pbCompressed, false);
Ionic.Zlib.GZipStream gz = new Ionic.Zlib.GZipStream(msCompressed, Ionic.Zlib.CompressionMode.Decompress);
GZipStream gz = new GZipStream(msCompressed, CompressionMode.Decompress);
MemoryStream msData = new MemoryStream();
MemUtil.CopyStream(gz, msData);
gz.Close();