Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/06/15 10:08:54 (10 years ago)
Author:
ascheibe
Message:

#2247 merged r11650, r11651 into stable

Location:
stable
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.Instances.DataAnalysis

  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/ResourceClassificationInstanceProvider.cs

    r11170 r11932  
    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        }
  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/UCI/UCIInstanceProvider.cs

    r11170 r11932  
    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          }
  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj

    r11920 r11932  
    105105  </PropertyGroup>
    106106  <ItemGroup>
    107     <Reference Include="ICSharpCode.SharpZipLib">
    108       <HintPath>..\..\HeuristicLab.PluginInfrastructure\3.3\ICSharpCode.SharpZipLib.dll</HintPath>
    109       <Private>False</Private>
    110     </Reference>
    111107    <Reference Include="System" />
    112108    <Reference Include="System.Core" />
    113109    <Reference Include="System.Drawing" />
     110    <Reference Include="System.IO.Compression" />
    114111    <Reference Include="System.Windows.Forms" />
    115112    <Reference Include="System.Xml.Linq" />
  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/RealWorld/RealWorldRegressionInstanceProvider.cs

    r11170 r11932  
    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 {
     
    5252      var solutionsArchiveName = GetResourceName(FileName + @"\.zip");
    5353      if (!String.IsNullOrEmpty(solutionsArchiveName)) {
    54         using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {
     54        using (var solutionsZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName), ZipArchiveMode.Read)) {
    5555          IList<string> entries = new List<string>();
    56           ZipEntry curEntry;
    57           while ((curEntry = solutionsZipFile.GetNextEntry()) != null) {
     56          foreach (var curEntry in solutionsZipFile.Entries) {
    5857            entries.Add(curEntry.Name);
    5958          }
  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/ResourceRegressionInstanceProvider.cs

    r11170 r11932  
    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        }
Note: See TracChangeset for help on using the changeset viewer.