Index: stable/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs
===================================================================
--- stable/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs	(revision 11920)
+++ stable/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs	(revision 11932)
@@ -30,5 +30,4 @@
 using HeuristicLab.Persistence.Interfaces;
 using HeuristicLab.Tracing;
-using ICSharpCode.SharpZipLib.Zip;
 
 namespace HeuristicLab.Persistence.Default.Xml {
@@ -286,5 +285,5 @@
     /// <param name="filename">The filename.</param>
     public static void Serialize(object o, string filename) {
-      Serialize(o, filename, ConfigurationService.Instance.GetConfiguration(new XmlFormat()), false, 5);
+      Serialize(o, filename, ConfigurationService.Instance.GetConfiguration(new XmlFormat()), false, CompressionLevel.Optimal);
     }
 
@@ -297,5 +296,5 @@
     /// <param name="filename">The filename.</param>
     /// <param name="compression">ZIP file compression level</param>
-    public static void Serialize(object o, string filename, int compression) {
+    public static void Serialize(object o, string filename, CompressionLevel compression) {
       Serialize(o, filename, ConfigurationService.Instance.GetConfiguration(new XmlFormat()), false, compression);
     }
@@ -309,5 +308,5 @@
     /// <param name="config">The configuration.</param>
     public static void Serialize(object obj, string filename, Configuration config) {
-      Serialize(obj, filename, config, false, 5);
+      Serialize(obj, filename, config, false, CompressionLevel.Optimal);
     }
 
@@ -320,5 +319,5 @@
     /// <param name="includeAssemblies">if set to <c>true</c> include needed assemblies.</param>
     /// <param name="compression">The ZIP compression level.</param>
-    public static void Serialize(object obj, string filename, Configuration config, bool includeAssemblies, int compression) {
+    public static void Serialize(object obj, string filename, Configuration config, bool includeAssemblies, CompressionLevel compression) {
       try {
         string tempfile = Path.GetTempFileName();
@@ -328,19 +327,18 @@
           serializer.InterleaveTypeInformation = false;
           XmlGenerator generator = new XmlGenerator();
-          using (ZipOutputStream zipStream = new ZipOutputStream(stream)) {
-            zipStream.IsStreamOwner = false;
-            zipStream.SetLevel(compression);
-            zipStream.PutNextEntry(new ZipEntry("data.xml") { DateTime = DateTime.MinValue });
-            StreamWriter writer = new StreamWriter(zipStream);
-            foreach (ISerializationToken token in serializer) {
-              string line = generator.Format(token);
-              writer.Write(line);
+          using (ZipArchive zipArchive = new ZipArchive(stream, ZipArchiveMode.Create)) {
+            ZipArchiveEntry entry = zipArchive.CreateEntry("data.xml", compression);
+            using (StreamWriter writer = new StreamWriter(entry.Open())) {
+              foreach (ISerializationToken token in serializer) {
+                string line = generator.Format(token);
+                writer.Write(line);
+              }
             }
-            writer.Flush();
-            zipStream.PutNextEntry(new ZipEntry("typecache.xml") { DateTime = DateTime.MinValue });
-            foreach (string line in generator.Format(serializer.TypeCache)) {
-              writer.Write(line);
+            entry = zipArchive.CreateEntry("typecache.xml", compression);
+            using (StreamWriter writer = new StreamWriter(entry.Open())) {
+              foreach (string line in generator.Format(serializer.TypeCache)) {
+                writer.Write(line);
+              }
             }
-            writer.Flush();
             if (includeAssemblies) {
               foreach (string name in serializer.RequiredFiles) {
@@ -350,14 +348,16 @@
                   continue;
                 }
-                zipStream.PutNextEntry(new ZipEntry(Path.GetFileName(uri.PathAndQuery)));
-                FileStream reader = File.OpenRead(uri.PathAndQuery);
-                byte[] buffer = new byte[1024 * 1024];
-                while (true) {
-                  int bytesRead = reader.Read(buffer, 0, 1024 * 1024);
-                  if (bytesRead == 0)
-                    break;
-                  zipStream.Write(buffer, 0, bytesRead);
+                entry = zipArchive.CreateEntry(Path.GetFileName(uri.PathAndQuery), compression);
+                using (BinaryWriter bw = new BinaryWriter(entry.Open())) {
+                  using (FileStream reader = File.OpenRead(uri.PathAndQuery)) {
+                    byte[] buffer = new byte[1024 * 1024];
+                    while (true) {
+                      int bytesRead = reader.Read(buffer, 0, 1024 * 1024);
+                      if (bytesRead == 0)
+                        break;
+                      bw.Write(buffer, 0, bytesRead);
+                    }
+                  }
                 }
-                writer.Flush();
               }
             }
@@ -407,7 +407,9 @@
         Serializer serializer = new Serializer(obj, config);
         Serialize(stream, serializer);
-      } catch (PersistenceException) {
+      }
+      catch (PersistenceException) {
         throw;
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Unexpected exception during Serialization.", e);
       }
@@ -427,7 +429,9 @@
         Serialize(stream, serializer);
         types = serializer.SerializedTypes;
-      } catch (PersistenceException) {
+      }
+      catch (PersistenceException) {
         throw;
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Unexpected exception during Serialization.", e);
       }
Index: stable/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs
===================================================================
--- stable/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs	(revision 11920)
+++ stable/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs	(revision 11932)
@@ -29,5 +29,4 @@
 using HeuristicLab.Persistence.Core.Tokens;
 using HeuristicLab.Persistence.Interfaces;
-using ICSharpCode.SharpZipLib.Zip;
 
 namespace HeuristicLab.Persistence.Default.Xml {
@@ -193,6 +192,8 @@
       TimeSpan start = System.Diagnostics.Process.GetCurrentProcess().TotalProcessorTime;
       try {
-        using (ZipFile file = new ZipFile(filename)) {
-          return Deserialize(file);
+        using (FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read)) {
+          using (ZipArchive zip = new ZipArchive(fs)) {
+            return Deserialize(zip);
+          }
         }
       }
@@ -247,17 +248,21 @@
     }
 
-    private static object Deserialize(ZipFile zipFile) {
-      try {
-        ZipEntry typecache = zipFile.GetEntry("typecache.xml");
-        if (typecache == null)
-          throw new PersistenceException("file does not contain typecache.xml");
-        Deserializer deSerializer = new Deserializer(ParseTypeCache(new StreamReader(zipFile.GetInputStream(typecache))));
-        ZipEntry data = zipFile.GetEntry("data.xml");
-        if (data == null)
-          throw new PersistenceException("file does not contain data.xml");
-        XmlParser parser = new XmlParser(
-          new StreamReader(zipFile.GetInputStream(data)));
-        object result = deSerializer.Deserialize(parser);
-        zipFile.Close();
+    private static object Deserialize(ZipArchive zipFile) {
+      try {
+        ZipArchiveEntry typecache = zipFile.GetEntry("typecache.xml");
+        if (typecache == null) throw new PersistenceException("file does not contain typecache.xml");
+        Deserializer deSerializer;
+        using (StreamReader sr = new StreamReader(typecache.Open())) {
+          deSerializer = new Deserializer(ParseTypeCache(sr));
+        }
+
+        ZipArchiveEntry data = zipFile.GetEntry("data.xml");
+        if (data == null) throw new PersistenceException("file does not contain data.xml");
+        object result;
+        using (StreamReader sr = new StreamReader(data.Open())) {
+          XmlParser parser = new XmlParser(sr);
+          result = deSerializer.Deserialize(parser);
+        }
+
         return result;
       }
Index: stable/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj
===================================================================
--- stable/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj	(revision 11920)
+++ stable/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj	(revision 11932)
@@ -116,9 +116,4 @@
   -->
   <ItemGroup>
-    <Reference Include="ICSharpCode.SharpZipLib, Version=0.85.4.369, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\bin\ICSharpCode.SharpZipLib.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
@@ -128,4 +123,5 @@
     <Reference Include="System.Data" />
     <Reference Include="System.Drawing" />
+    <Reference Include="System.IO.Compression" />
     <Reference Include="System.Xml" />
   </ItemGroup>
