From d61b5cde2bfb39ecb0b45602a51b740e56c3697e Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Thu, 28 May 2026 09:22:25 +0100 Subject: [PATCH] fmt --- src/SharpCompress/Common/Tar/TarFilePart.cs | 4 +--- src/SharpCompress/Common/Tar/TarHeaderFactory.Async.cs | 5 +---- src/SharpCompress/Common/Tar/TarHeaderFactory.cs | 5 +---- .../Common/Zip/SeekableZipFilePart.Async.cs | 9 ++++----- src/SharpCompress/Common/Zip/SeekableZipFilePart.cs | 1 - 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/src/SharpCompress/Common/Tar/TarFilePart.cs b/src/SharpCompress/Common/Tar/TarFilePart.cs index 75b0be73..8aa16634 100644 --- a/src/SharpCompress/Common/Tar/TarFilePart.cs +++ b/src/SharpCompress/Common/Tar/TarFilePart.cs @@ -75,9 +75,7 @@ internal sealed class TarFilePart : FilePart if (_seekableStream != null) { _seekableStream.Position = Header.DataStartPosition ?? 0; - return new ValueTask( - new TarReadOnlySubStream(_seekableStream, Header.Size) - ); + return new ValueTask(new TarReadOnlySubStream(_seekableStream, Header.Size)); } return new ValueTask(Header.PackedStream.NotNull()); } diff --git a/src/SharpCompress/Common/Tar/TarHeaderFactory.Async.cs b/src/SharpCompress/Common/Tar/TarHeaderFactory.Async.cs index 460be1cc..c011abd2 100644 --- a/src/SharpCompress/Common/Tar/TarHeaderFactory.Async.cs +++ b/src/SharpCompress/Common/Tar/TarHeaderFactory.Async.cs @@ -44,10 +44,7 @@ internal static partial class TarHeaderFactory break; case StreamingMode.Streaming: { - header.PackedStream = new TarReadOnlySubStream( - stream, - header.Size - ); + header.PackedStream = new TarReadOnlySubStream(stream, header.Size); } break; default: diff --git a/src/SharpCompress/Common/Tar/TarHeaderFactory.cs b/src/SharpCompress/Common/Tar/TarHeaderFactory.cs index 6053fa10..c95efaef 100644 --- a/src/SharpCompress/Common/Tar/TarHeaderFactory.cs +++ b/src/SharpCompress/Common/Tar/TarHeaderFactory.cs @@ -38,10 +38,7 @@ internal static partial class TarHeaderFactory break; case StreamingMode.Streaming: { - header.PackedStream = new TarReadOnlySubStream( - stream, - header.Size - ); + header.PackedStream = new TarReadOnlySubStream(stream, header.Size); } break; default: diff --git a/src/SharpCompress/Common/Zip/SeekableZipFilePart.Async.cs b/src/SharpCompress/Common/Zip/SeekableZipFilePart.Async.cs index 3b082a71..2c17e513 100644 --- a/src/SharpCompress/Common/Zip/SeekableZipFilePart.Async.cs +++ b/src/SharpCompress/Common/Zip/SeekableZipFilePart.Async.cs @@ -10,6 +10,7 @@ namespace SharpCompress.Common.Zip; internal partial class SeekableZipFilePart : IDisposable { private readonly SemaphoreSlim _asyncHeaderSemaphore = new(1, 1); + internal override async ValueTask GetCompressedStreamAsync( CancellationToken cancellationToken = default ) @@ -75,10 +76,9 @@ internal partial class SeekableZipFilePart : IDisposable try { - Header = await _headerFactory.GetLocalHeaderAsync( - streamToUse, - (DirectoryEntryHeader)Header - ).ConfigureAwait(false); + Header = await _headerFactory + .GetLocalHeaderAsync(streamToUse, (DirectoryEntryHeader)Header) + .ConfigureAwait(false); } finally { @@ -99,5 +99,4 @@ internal partial class SeekableZipFilePart : IDisposable } public void Dispose() => _asyncHeaderSemaphore.Dispose(); - } diff --git a/src/SharpCompress/Common/Zip/SeekableZipFilePart.cs b/src/SharpCompress/Common/Zip/SeekableZipFilePart.cs index 7e797fac..d783d2f2 100644 --- a/src/SharpCompress/Common/Zip/SeekableZipFilePart.cs +++ b/src/SharpCompress/Common/Zip/SeekableZipFilePart.cs @@ -88,7 +88,6 @@ internal partial class SeekableZipFilePart : ZipFilePart } } - protected override Stream CreateBaseStream() { // If BaseStream is a SourceStream in file mode with multi-threading enabled,