Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/04/14 12:56:57 (10 years ago)
Author:
ascheibe
Message:

#2247 switched persistence, instance providers, plugin infrastructure and MathJax to System.IO.Compression

Location:
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/ResourceClassificationInstanceProvider.cs

    r11171 r11650  
    2323using System.Globalization;
    2424using System.IO;
     25using System.IO.Compression;
    2526using System.Linq;
    2627using System.Reflection;
    2728using System.Text.RegularExpressions;
    2829using HeuristicLab.Problems.DataAnalysis;
    29 using ICSharpCode.SharpZipLib.Zip;
    3030
    3131namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    3838
    3939      var instanceArchiveName = GetResourceName(FileName + @"\.zip");
    40       using (var instancesZipFile = new ZipFile(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {
     40      using (var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) {
    4141        var entry = instancesZipFile.GetEntry(descriptor.ResourceName);
    4242        NumberFormatInfo numberFormat;
    4343        DateTimeFormatInfo dateFormat;
    4444        char separator;
    45         using (Stream stream = instancesZipFile.GetInputStream(entry)) {
     45        using (Stream stream = entry.Open()) {
    4646          TableFileParser.DetermineFileFormat(stream, out numberFormat, out dateFormat, out separator);
    4747        }
    4848
    4949        TableFileParser csvFileParser = new TableFileParser();
    50         using (Stream stream = instancesZipFile.GetInputStream(entry)) {
     50        using (Stream stream = entry.Open()) {
    5151          csvFileParser.Parse(stream, numberFormat, dateFormat, separator, true);
    5252        }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/UCI/UCIInstanceProvider.cs

    r11171 r11650  
    2323using System.Collections.Generic;
    2424using System.IO;
     25using System.IO.Compression;
    2526using System.Linq;
    26 using ICSharpCode.SharpZipLib.Zip;
    2727
    2828namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    5656      var solutionsArchiveName = GetResourceName(FileName + @"\.zip");
    5757      if (!String.IsNullOrEmpty(solutionsArchiveName)) {
    58         using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {
     58        using (var solutionsZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName), ZipArchiveMode.Read)) {
    5959          IList<string> entries = new List<string>();
    60           ZipEntry curEntry;
    61           while ((curEntry = solutionsZipFile.GetNextEntry()) != null) {
     60          foreach (var curEntry in solutionsZipFile.Entries) {
    6261            entries.Add(curEntry.Name);
    6362          }
Note: See TracChangeset for help on using the changeset viewer.