mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use DotNetZip for BZ2 as it's twice as fast.
This commit is contained in:
@@ -88,6 +88,7 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DotNetZip" Version="1.15.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.29.0" />
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.1" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -34,8 +34,7 @@ using System;
|
||||
using System.IO;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
using SharpCompress.Compressors;
|
||||
using SharpCompress.Compressors.BZip2;
|
||||
using Ionic.BZip2;
|
||||
|
||||
namespace Aaru.Filters
|
||||
{
|
||||
@@ -157,7 +156,7 @@ namespace Aaru.Filters
|
||||
BasePath = null;
|
||||
CreationTime = DateTime.UtcNow;
|
||||
LastWriteTime = CreationTime;
|
||||
_innerStream = new ForcedSeekStream<BZip2Stream>(_dataStream, CompressionMode.Decompress, false);
|
||||
_innerStream = new ForcedSeekStream<BZip2InputStream>(_dataStream, false);
|
||||
DataForkLength = _innerStream.Length;
|
||||
|
||||
return Errno.NoError;
|
||||
@@ -170,7 +169,7 @@ namespace Aaru.Filters
|
||||
BasePath = null;
|
||||
CreationTime = DateTime.UtcNow;
|
||||
LastWriteTime = CreationTime;
|
||||
_innerStream = new ForcedSeekStream<BZip2Stream>(_dataStream, CompressionMode.Decompress, false);
|
||||
_innerStream = new ForcedSeekStream<BZip2InputStream>(_dataStream, false);
|
||||
DataForkLength = _innerStream.Length;
|
||||
|
||||
return Errno.NoError;
|
||||
@@ -185,7 +184,7 @@ namespace Aaru.Filters
|
||||
var fi = new FileInfo(path);
|
||||
CreationTime = fi.CreationTimeUtc;
|
||||
LastWriteTime = fi.LastWriteTimeUtc;
|
||||
_innerStream = new ForcedSeekStream<BZip2Stream>(_dataStream, CompressionMode.Decompress, false);
|
||||
_innerStream = new ForcedSeekStream<BZip2InputStream>(_dataStream, false);
|
||||
DataForkLength = _innerStream.Length;
|
||||
|
||||
return Errno.NoError;
|
||||
|
||||
@@ -45,7 +45,7 @@ using Claunia.PropertyList;
|
||||
using Claunia.RsrcFork;
|
||||
using Ionic.Zlib;
|
||||
using SharpCompress.Compressors.ADC;
|
||||
using SharpCompress.Compressors.BZip2;
|
||||
using Ionic.BZip2;
|
||||
using Version = Resources.Version;
|
||||
|
||||
#pragma warning disable 612
|
||||
@@ -446,8 +446,7 @@ namespace Aaru.DiscImages
|
||||
|
||||
break;
|
||||
case CHUNK_TYPE_BZIP:
|
||||
decStream = new BZip2Stream(cmpMs, SharpCompress.Compressors.CompressionMode.Decompress,
|
||||
false);
|
||||
decStream = new BZip2InputStream(cmpMs, false);
|
||||
|
||||
break;
|
||||
case CHUNK_TYPE_RLE: break;
|
||||
|
||||
Reference in New Issue
Block a user