Skip to content

Commit

Permalink
Fix #6
Browse files Browse the repository at this point in the history
Replacing GZipStream with SharpZipLib's GZipInputStream fixes the issue
without requiring any other code modification. The root cause is yet
unknown.
  • Loading branch information
nurhafiz committed Oct 11, 2023
1 parent 2345d2d commit 9c9fec9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
7 changes: 2 additions & 5 deletions src/Toimik.WarcProtocol/CompressionStreamFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

namespace Toimik.WarcProtocol;

using ICSharpCode.SharpZipLib.GZip;
using System.IO;
using System.IO.Compression;

public class CompressionStreamFactory
{
Expand All @@ -27,9 +27,6 @@ public CompressionStreamFactory()

public virtual Stream CreateDecompressStream(Stream stream)
{
return new GZipStream(
stream,
CompressionMode.Decompress,
leaveOpen: true);
return new GZipInputStream(stream);
}
}
5 changes: 3 additions & 2 deletions src/Toimik.WarcProtocol/Toimik.WarcProtocol.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<AssemblyName>Toimik.WarcProtocol</AssemblyName>
<PackageVersion>0.8.0</PackageVersion>
<PackageVersion>0.9.0</PackageVersion>
<Authors>Nurhafiz</Authors>
<Version>0.8.0</Version>
<Version>0.9.0</Version>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Company>Toimik</Company>
<Description>
Expand All @@ -24,6 +24,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
12 changes: 6 additions & 6 deletions tests/Toimik.WarcProtocol.Tests/Toimik.WarcProtocol.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="3.2.0">
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="SharpZipLib" Version="1.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 9c9fec9

Please sign in to comment.