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 unknown for now.
  • Loading branch information
nurhafiz committed Oct 11, 2023
1 parent a0fe18e commit 78867aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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);
}
}
1 change: 1 addition & 0 deletions src/Toimik.WarcProtocol/Toimik.WarcProtocol.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 78867aa

Please sign in to comment.