Clean up for async creation - #1132
Conversation
# Conflicts: # tests/SharpCompress.Test/SevenZip/SevenZipArchiveAsyncTests.cs
|
@copilot fix the SevenZipArchive_LZMA_AsyncStreamExtraction test |
|
@adamhathcock I've opened a new pull request, #1133, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
…adDatabase methods Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Add async I/O support for SevenZip archive initialization
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
|
Upgrading to xunit v3 that properly supports ValueTask as revealed that not all the tests were running correctly. |
…kable streams) Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request introduces asynchronous detection methods for multiple archive and compression formats to enable non-blocking file type checks. The changes also refactor synchronous detection logic to use pooled buffers for improved performance and remove unnecessary cancellation token parameters from the IArchiveFactory interface.
Changes:
- Added async
IsArchiveAsyncmethods for ACE, ARJ, BZip2, LZip, LZW, ZStandard, RAR, SevenZip, TAR, and XZ formats with proper cancellation token support - Refactored ARC and SevenZip format detection to use
ArrayPool<byte>.Sharedfor buffer management, reducing allocations - Removed
CancellationTokenparameter fromIArchiveFactory.OpenAsyncArchiveinterface methods to simplify the API
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/SharpCompress.Test/SevenZip/SevenZipArchiveAsyncTests.cs | Updated test methods to return Task instead of ValueTask, enabled tests for .NET Framework with conditional compilation, and commented out one test |
| tests/SharpCompress.Test/Mocks/AsyncOnlyStream.cs | Changed base class from Stream to SharpCompressStream |
| tests/SharpCompress.Test/ArchiveTests.cs | Removed two test methods for async archive opening scenarios |
| src/SharpCompress/packages.lock.json | Updated Microsoft.NET.ILLink.Tasks from 10.0.0 to 10.0.1 |
| src/SharpCompress/Factories/ZipFactory.cs | Removed duplicate IsArchiveAsync method |
| src/SharpCompress/Factories/ZStandardFactory.cs | Added CancellationToken parameter to IsArchiveAsync method signature |
| src/SharpCompress/Factories/TarFactory.cs | Updated IsArchiveAsync to call new TarArchive.IsTarFileAsync method and removed CancellationToken from OpenAsyncArchive |
| src/SharpCompress/Factories/SevenZipFactory.cs | Added async detection implementation and updated OpenAsyncArchive methods to remove CancellationToken |
| src/SharpCompress/Factories/RarFactory.cs | Added async detection method and removed CancellationToken from OpenAsyncArchive |
| src/SharpCompress/Factories/GZipFactory.cs | Removed CancellationToken parameter from OpenAsyncArchive method |
| src/SharpCompress/Factories/Factory.cs | Made IsArchiveAsync abstract with CancellationToken parameter and removed unused TryOpenReaderAsync method |
| src/SharpCompress/Factories/ArjFactory.cs | Added async detection method via ArjHeader.IsArchiveAsync |
| src/SharpCompress/Factories/ArcFactory.cs | Implemented async detection using ArrayPool<byte>.Shared for buffer management |
| src/SharpCompress/Factories/AceFactory.cs | Added async detection method via AceHeader.IsArchiveAsync |
| src/SharpCompress/Compressors/ZStandard/ZStandardStream.cs | Added IsZStandardAsync method for async format detection |
| src/SharpCompress/Compressors/Xz/XZStream.cs | Added IsXZStreamAsync method for async format detection |
| src/SharpCompress/Compressors/Lzw/LzwStream.cs | Added IsLzwStreamAsync method for async format detection |
| src/SharpCompress/Compressors/LZMA/LZipStream.cs | Added IsLZipFileAsync and ValidateAndReadSizeAsync methods for async detection |
| src/SharpCompress/Compressors/BZip2/BZip2Stream.cs | Added IsBZip2Async method for async format detection |
| src/SharpCompress/Common/SevenZip/ArchiveReader.cs | Added OpenAsync and ReadDatabaseAsync methods for async archive reading |
| src/SharpCompress/Common/Arj/Headers/ArjHeader.cs | Added IsArchiveAsync method for async detection |
| src/SharpCompress/Common/Ace/Headers/AceHeader.cs | Added IsArchiveAsync method for async detection |
| src/SharpCompress/Archives/Tar/TarArchive.Factory.cs | Added IsTarFileAsync method (currently synchronous implementation) |
| src/SharpCompress/Archives/SevenZip/SevenZipArchive.cs | Refactored LoadEntries and added LoadEntriesAsync with LoadFactoryAsync for async archive processing |
| src/SharpCompress/Archives/SevenZip/SevenZipArchive.Factory.cs | Added IsSevenZipFileAsync, refactored signature matching to use ArrayPool<byte>.Shared, and added OpenAsyncArchive overloads |
| src/SharpCompress/Archives/Rar/RarArchive.Factory.cs | Added IsRarFileAsync method (currently synchronous implementation) |
| src/SharpCompress/Archives/IArchiveFactory.cs | Removed CancellationToken parameter from OpenAsyncArchive(FileInfo) method |
| src/SharpCompress/Archives/AutoArchiveFactory.cs | Updated OpenAsyncArchive to match interface changes |
| src/SharpCompress/Archives/ArchiveFactory.cs | Updated calls to remove CancellationToken parameter when calling factory methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public static async ValueTask<bool> IsTarFileAsync( | ||
| Stream stream, | ||
| CancellationToken cancellationToken = default | ||
| ) | ||
| { | ||
| cancellationToken.ThrowIfCancellationRequested(); | ||
| try | ||
| { | ||
| var tarHeader = new TarHeader(new ArchiveEncoding()); | ||
| var reader = new BinaryReader(stream); | ||
| var readSucceeded = tarHeader.Read(reader); | ||
| var isEmptyArchive = | ||
| tarHeader.Name?.Length == 0 | ||
| && tarHeader.Size == 0 | ||
| && Enum.IsDefined(typeof(EntryType), tarHeader.EntryType); | ||
| return readSucceeded || isEmptyArchive; | ||
| } | ||
| catch { } | ||
| return false; | ||
| } |
There was a problem hiding this comment.
The IsTarFileAsync method does not actually perform any asynchronous operations. It synchronously reads from the stream using the synchronous Read method of BinaryReader. This defeats the purpose of having an async method and could block the calling thread. The method should be refactored to use ReadAsync or similar asynchronous I/O operations to properly support async file detection.
| public static async ValueTask<bool> IsRarFileAsync( | ||
| Stream stream, | ||
| ReaderOptions? options = null, | ||
| CancellationToken cancellationToken = default | ||
| ) | ||
| { | ||
| cancellationToken.ThrowIfCancellationRequested(); | ||
| try | ||
| { | ||
| MarkHeader.Read(stream, true, false); | ||
| return true; | ||
| } | ||
| catch | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
The IsRarFileAsync method does not actually perform any asynchronous operations. It synchronously reads from the stream using the synchronous Read method within MarkHeader.Read. This defeats the purpose of having an async method and could block the calling thread. The method should be refactored to use ReadAsync or implement a proper async version of MarkHeader.Read to support true asynchronous file detection.
| @@ -47,9 +47,5 @@ public interface IArchiveFactory : IFactory | |||
| /// <param name="fileInfo">the file to open.</param> | |||
| /// <param name="readerOptions">reading options.</param> | |||
| /// <param name="cancellationToken">Cancellation token.</param> | |||
There was a problem hiding this comment.
The XML documentation comment includes a param tag for cancellationToken on line 49, but the actual method signature on line 50 no longer has this parameter. This will cause a documentation warning. Remove the cancellationToken documentation parameter.
| /// <param name="cancellationToken">Cancellation token.</param> |
| var buffer = ArrayPool<byte>.Shared.Rent(6); | ||
| try | ||
| { | ||
| if (!await stream.ReadFullyAsync(buffer, cancellationToken).ConfigureAwait(false)) |
There was a problem hiding this comment.
The ReadFullyAsync call attempts to read buffer.Length bytes from the stream, but the buffer is rented from ArrayPool<byte>.Shared.Rent(6), which may return a buffer larger than 6 bytes. This could cause the method to try reading more bytes than intended and potentially block or fail. Use the overload ReadFullyAsync(buffer, 0, 6, cancellationToken) to explicitly specify reading exactly 6 bytes.
| if (!await stream.ReadFullyAsync(buffer, cancellationToken).ConfigureAwait(false)) | |
| if (!await stream.ReadFullyAsync(buffer, 0, 6, cancellationToken).ConfigureAwait(false)) |
| private readonly Stream _stream; | ||
|
|
||
| public AsyncOnlyStream(Stream stream) | ||
| : base(stream) | ||
| { | ||
| _stream = stream; | ||
| // Console.WriteLine("AsyncOnlyStream created"); |
There was a problem hiding this comment.
The AsyncOnlyStream now stores the same stream in both the _stream field and the base SharpCompressStream class through the base(stream) call. This creates redundancy and could lead to maintenance issues. Consider removing the _stream field and using the inherited Stream property from SharpCompressStream instead. All references to _stream in this class should be changed to use the base class property.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
| && Enum.IsDefined(typeof(EntryType), tarHeader.EntryType); | ||
| return readSucceeded || isEmptyArchive; | ||
| } | ||
| catch { } |
There was a problem hiding this comment.
Poor error handling: empty catch block.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
|
@adamhathcock I've opened a new pull request, #1138, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Updated [SharpCompress](https://github.com/adamhathcock/sharpcompress) from 0.29.0 to 0.48.0. <details> <summary>Release notes</summary> _Sourced from [SharpCompress's releases](https://github.com/adamhathcock/sharpcompress/releases)._ ## 0.48.0 Getting some fixes out to prep for bigger release - async writing might still not work on non-async streams ## What's Changed * Fix SevenZipArchive.IsSolidAsync() always returning false by @Copilot in adamhathcock/sharpcompress#1284 * Fix sync methods called in async RAR unpacker paths (Unpack29Async, U… by @adamhathcock in adamhathcock/sharpcompress#1306 * adamhathcock/sharpcompress#1313 **Full Changelog**: adamhathcock/sharpcompress@0.47.4...0.48.0 ## 0.47.4 ## What's Changed * Dynamic ring buffer sizing for BZip2 and ZStandard on non-seekable streams by @Copilot in adamhathcock/sharpcompress#1273 * Fix fuzzer-found decompression bomb and crash bugs by @Copilot in adamhathcock/sharpcompress#1272 **Full Changelog**: adamhathcock/sharpcompress@0.47.3...0.47.4 ## 0.47.3 ## What's Changed * Fix denial-of-service crashes in 8 decompressors on malformed input by @Copilot in adamhathcock/sharpcompress#1260 **Full Changelog**: adamhathcock/sharpcompress@0.47.2...0.47.3 ## 0.47.2 Making the default experience better with a larger buffer size. ## What's Changed * Increase default RewindableBufferSize to 160KB to handle ZStandard tar detection by @Copilot in adamhathcock/sharpcompress#1257 **Full Changelog**: adamhathcock/sharpcompress@0.47.1...0.47.2 ## 0.47.1 ## What's Changed * Proper test file clean up by @adamhathcock in adamhathcock/sharpcompress#1245 * Fix ZIP64 stream bounding and WinZip AES read-state corruption in ZIP reader by @adamhathcock in adamhathcock/sharpcompress#1253 **Full Changelog**: adamhathcock/sharpcompress@0.47.0...0.47.1 ## 0.47.0 I think this is the last breaking change before I mark things as 1.0. Looking for feedback ## What's Changed * Fix CompressionType for WinZip AES encrypted ZIP entries by @Copilot in adamhathcock/sharpcompress#1213 * Add ability to have alternate compressions by @adamhathcock in adamhathcock/sharpcompress#1197 * Expose SharpCompressStream to allow ringbuffer to be used on non-seekable streams by @adamhathcock in adamhathcock/sharpcompress#1220 * Tightening build errors by warnings as errors and making more build time issues by @adamhathcock in adamhathcock/sharpcompress#1214 * Use more SharpCompress exceptions instead of generic ones by @adamhathcock in adamhathcock/sharpcompress#1224 * Added Net7.0 / Net 6.0 / Net 5.0 and NetStandard2.1 by @Nanook in adamhathcock/sharpcompress#1227 * Writers should have async API by @adamhathcock in adamhathcock/sharpcompress#1211 * Add 7z archive writer with LZMA/LZMA2 compression by @DanNsk in adamhathcock/sharpcompress#1229 * Add async 7z writing by @adamhathcock in adamhathcock/sharpcompress#1235 * Bump actions/upload-artifact from 6 to 7 by @dependabot[bot] in adamhathcock/sharpcompress#1240 * Moving extraction options back by @adamhathcock in adamhathcock/sharpcompress#1239 * Fix DataErrorException when extracting LZMA-compressed zero-byte ZIP entries by @Copilot in adamhathcock/sharpcompress#1237 * Update test dependencies by @adamhathcock in adamhathcock/sharpcompress#1242 ## New Contributors * @DanNsk made their first contribution in adamhathcock/sharpcompress#1229 **Full Changelog**: adamhathcock/sharpcompress@0.46.4...0.47.0 ## 0.46.4 ## What's Changed * Fix DataErrorException when extracting LZMA-compressed zero-byte ZIP entries by @adamhathcock in adamhathcock/sharpcompress#1238 **Full Changelog**: adamhathcock/sharpcompress@0.46.3...0.46.4 ## 0.46.3 ## What's Changed * Fix SharpCompressStream.Create() buffer size misalignment for non-seekable streams by @Copilot in adamhathcock/sharpcompress#1234 * Make SharpCompressStream public by @adamhathcock in adamhathcock/sharpcompress#1233 **Full Changelog**: adamhathcock/sharpcompress@0.46.2...0.46.3 ## 0.46.2 ## What's Changed * Downgrade dependencies for legacy frameworks by @adamhathcock in adamhathcock/sharpcompress#1226 **Full Changelog**: adamhathcock/sharpcompress@0.46.1...0.46.2 ## 0.46.1 ## What's Changed * Fix NullReferenceException when extracting 7z empty-stream entries by @Copilot in adamhathcock/sharpcompress#1219 **Full Changelog**: adamhathcock/sharpcompress@0.46.0...0.46.1 ## 0.46.0 Open/Create must be asynchronous now so they return ValueTasks when they didn't before. ## What's Changed * RAR5 (and maybe others) async methods are different by @adamhathcock in adamhathcock/sharpcompress#1203 * update benchmarks to include async paths by @adamhathcock in adamhathcock/sharpcompress#1202 * OpenAsyncReader, OpenAsyncArchive and others must be async for Tar detection by @adamhathcock in adamhathcock/sharpcompress#1210 **Full Changelog**: adamhathcock/sharpcompress@0.45.1...0.46.0 ## 0.45.1 The big regression was fixed in 0.44.5 and 0.45.0 but only for sync. This does it for async too. ## What's Changed * fix async 7z seeking by @adamhathcock in adamhathcock/sharpcompress#1200 **Full Changelog**: adamhathcock/sharpcompress@0.45.0...0.45.1 ## 0.45.0 This release should be fully async as well as sync depending on the API used. I've endeavoured to make sure no sync methods are used when going via the async interface (and vice versa) but you never know. Tests should cover things as well as the recent fixes (like the 7z regression) Options and the API have been revamped so expect API breakages. I think it should be straight-forward but things won't compile. There is a thing about Dispose vs async Disposing that may or may not be fully covered 😬 Feedback is welcome as I think 1.0 is around the corner with the introduction of Providers and other things. I wanted to get the async revamp out generally first though. ## What's Changed * Consolidate stream extension methods and simplify with framework methods by @Copilot in adamhathcock/sharpcompress#1100 * Change ArchiveEncoding to interface. by @adamhathcock in adamhathcock/sharpcompress#1117 * Readd netstandard 2.0 by @adamhathcock in adamhathcock/sharpcompress#1122 * Add more documentation by @adamhathcock in adamhathcock/sharpcompress#1123 * Fix async test method naming inconsistency in ZipArchiveAsyncTests by @Copilot in adamhathcock/sharpcompress#1124 * [WIP] Update ZipReader and ZipWriter based on review feedback by @Copilot in adamhathcock/sharpcompress#1125 * Fix typo in TestBase.cs comment by @Copilot in adamhathcock/sharpcompress#1126 * Fix async test method naming in ZipArchiveAsyncTests by @Copilot in adamhathcock/sharpcompress#1127 * More async for ZipReader and ZipWriter by @adamhathcock in adamhathcock/sharpcompress#1121 * Add ArcReaderAsync tests by @adamhathcock in adamhathcock/sharpcompress#1036 * Change interfaces to be consistent for new Async paths (definitely breaks things) by @adamhathcock in adamhathcock/sharpcompress#1128 * More test fixes and some perf changes by @adamhathcock in adamhathcock/sharpcompress#1131 * Consolidate NETFRAMEWORK/NETSTANDARD compile flags into LEGACY_DOTNET by @Copilot in adamhathcock/sharpcompress#1135 * Add async I/O support for SevenZip archive initialization by @Copilot in adamhathcock/sharpcompress#1133 * Remove redundant stream field in AsyncOnlyStream by @Copilot in adamhathcock/sharpcompress#1138 * Replace empty catch blocks with explicit exception handling in TarArchive validation methods by @Copilot in adamhathcock/sharpcompress#1140 * Fix async test failures after xunit v3 upgrade by @Copilot in adamhathcock/sharpcompress#1137 * Upgrade xunit to v3 by @adamhathcock in adamhathcock/sharpcompress#1136 * Fix ReadFullyAsync with ArrayPool buffer in SevenZipArchive signature check by @Copilot in adamhathcock/sharpcompress#1142 * [WIP] Address feedback on async creation cleanup changes by @Copilot in adamhathcock/sharpcompress#1141 * Add leaveOpen parameter to LZipStream and BZip2Stream by @Copilot in adamhathcock/sharpcompress#1145 * Fix EntryStream.Dispose() throwing NotSupportedException on non-seekable streams by @Copilot in adamhathcock/sharpcompress#1151 * Fix dispose methods to always set _isDisposed and call base.Dispose() when LeaveOpen is true by @Copilot in adamhathcock/sharpcompress#1152 * Fix silent iteration failure when input stream throws on Flush() by @Copilot in adamhathcock/sharpcompress#1156 * release to master by @adamhathcock in adamhathcock/sharpcompress#1162 * Clean up for async creation by @adamhathcock in adamhathcock/sharpcompress#1132 * Fix infinite loop in SourceStream.Seek for malformed archives by @Copilot in adamhathcock/sharpcompress#1178 * [WIP] WIP address feedback on AOT props and cleanup by @Copilot in adamhathcock/sharpcompress#1182 * Add AOT to props and clean up in release by @adamhathcock in adamhathcock/sharpcompress#1181 * merge release to master by @adamhathcock in adamhathcock/sharpcompress#1174 * release to master merge by @adamhathcock in adamhathcock/sharpcompress#1183 * Some clean up post-async merging by @adamhathcock in adamhathcock/sharpcompress#1184 * Clean up again by @adamhathcock in adamhathcock/sharpcompress#1187 * Add automated performance benchmarks with BenchmarkDotNet by @Copilot in adamhathcock/sharpcompress#1188 * Bump csharpier from 1.2.5 to 1.2.6 by @dependabot[bot] in adamhathcock/sharpcompress#1192 * Change and clean up options by @adamhathcock in adamhathcock/sharpcompress#1193 * Fix archive extraction to preserve directory structure when options is null by @Copilot in adamhathcock/sharpcompress#1191 * Add LzwReader support for .Z compressed archives by @Copilot in adamhathcock/sharpcompress#1189 * add configure await by @adamhathcock in adamhathcock/sharpcompress#1195 ... (truncated) ## 0.44.5 ## What's Changed * Add [Obsolete] attribute to ReaderOptions.DefaultBufferSize for backward compatibility by @Copilot in adamhathcock/sharpcompress#1166 * Fix grammatical errors in ArcFactory comment documentation by @Copilot in adamhathcock/sharpcompress#1167 * (Release) Buffer size consolidation by @adamhathcock in adamhathcock/sharpcompress#1165 * Fix ZIP parsing failure on non-seekable streams with short reads by @Copilot in adamhathcock/sharpcompress#1169 * Fix SevenZipReader to maintain contiguous stream state for solid archives by @Copilot in adamhathcock/sharpcompress#1172 **Full Changelog**: adamhathcock/sharpcompress@0.44.4...0.44.5 ## 0.44.4 ## What's Changed * Fix ArrayPool corruption from double-disposal in BufferedSubStream by @Copilot in adamhathcock/sharpcompress#1161 * add check to see if we need to seek before hand by @adamhathcock in adamhathcock/sharpcompress#1160 **Full Changelog**: adamhathcock/sharpcompress@0.44.3...0.44.4 ## 0.44.3 ## What's Changed * Merge pull request #1156 from adamhathcock/copilot/fix-sharpcompress-… by @adamhathcock in adamhathcock/sharpcompress#1157 **Full Changelog**: adamhathcock/sharpcompress@0.44.2...0.44.3 ## 0.44.2 ## What's Changed * Adam/1151 release cherry pick by @adamhathcock in adamhathcock/sharpcompress#1154 same as adamhathcock/sharpcompress#1151 **Full Changelog**: adamhathcock/sharpcompress@0.44.1...0.44.2 ## 0.44.1 ## What's Changed * Merge pull request #1145 from adamhathcock/copilot/add-leaveopen-para… by @adamhathcock in adamhathcock/sharpcompress#1146 **Full Changelog**: adamhathcock/sharpcompress@0.44.0...0.44.1 ## 0.44.0 ## What's Changed * Configure nuget-release workflow to validate PRs without publishing by @Copilot in adamhathcock/sharpcompress#1099 * remove old release by @adamhathcock in adamhathcock/sharpcompress#1098 * Fix InvalidOperationException when RAR uncompressed size exceeds header value by @Copilot in adamhathcock/sharpcompress#1104 * Bump csharpier from 1.2.4 to 1.2.5 by @dependabot[bot] in adamhathcock/sharpcompress#1108 * Add support for ACE archives by @TwanVanDongen in adamhathcock/sharpcompress#1102 * Formats.md updated to reflect additions of Ace, Arc and Arj by @TwanVanDongen in adamhathcock/sharpcompress#1110 * Bump SimpleExec from 12.1.0 to 13.0.0 by @dependabot[bot] in adamhathcock/sharpcompress#1109 * Fix a usage of ReadOnly that use dispose in 7Zip by @adamhathcock in adamhathcock/sharpcompress#1113 * Fix async decompression of .7z files by implementing Memory<byte> ReadAsync overload by @Copilot in adamhathcock/sharpcompress#1114 * Update docs by @adamhathcock in adamhathcock/sharpcompress#1120 **Full Changelog**: adamhathcock/sharpcompress@0.43.0...0.44.0 ## 0.43.0 Big changes: Progress was redone to use IProgress. ZstdSharp was moved into the project. More groundwork for full async as well as more contributions and bug fixes! ## What's Changed * Drop .NET 6, .NET Standard 2.0, .NET 4.8.1, add .NET 10 support by @Copilot in adamhathcock/sharpcompress#1049 * Document ZipReader DirectoryEntry behavior and add verification test by @Copilot in adamhathcock/sharpcompress#1054 * Fix launch.json debug configurations to use net10.0 by @Copilot in adamhathcock/sharpcompress#1056 * add vscode config by @adamhathcock in adamhathcock/sharpcompress#1055 * Consolidate agent instructions into AGENTS.md by @Copilot in adamhathcock/sharpcompress#1058 * Agent instructions by @adamhathcock in adamhathcock/sharpcompress#1057 * Add archive-level password protection flags for 7z and rar by @HeroponRikiBestest in adamhathcock/sharpcompress#1060 * Add alternative option for writing TAR archives with USTAR header format by @drone1400 in adamhathcock/sharpcompress#1063 * Bump actions/upload-artifact from 5 to 6 by @dependabot[bot] in adamhathcock/sharpcompress#1071 * Bump csharpier from 1.2.1 to 1.2.3 by @dependabot[bot] in adamhathcock/sharpcompress#1072 * Move ZstdSharp into SharpCompress - Complete Integration by @Copilot in adamhathcock/sharpcompress#1052 * Unified progress reporting for compression and extraction operations by @Copilot in adamhathcock/sharpcompress#1044 * Fix async LZMA extraction bug for 7Zip archives by @Copilot in adamhathcock/sharpcompress#1081 * Standardize extraction API to WriteToDirectory with IProgress support by @Copilot in adamhathcock/sharpcompress#1080 * add extract all test by @adamhathcock in adamhathcock/sharpcompress#1076 * Bump JetBrains.Profiler.SelfApi from 2.5.14 to 2.5.15 by @dependabot[bot] in adamhathcock/sharpcompress#1082 * Avoid NotSupportedException overhead in SharpCompressStream for non-seekable streams by @Copilot in adamhathcock/sharpcompress#1084 * add some markdown files for planning by @adamhathcock in adamhathcock/sharpcompress#1085 * Remove ExtractAllEntries restriction for non-SOLID archives by @Copilot in adamhathcock/sharpcompress#1077 * Add back System.Buffers and System.Memory to central package management by @Copilot in adamhathcock/sharpcompress#1093 * Update dependencies by @adamhathcock in adamhathcock/sharpcompress#1091 * Add GitHub Actions workflow for automated NuGet releases with multi-platform builds by @Copilot in adamhathcock/sharpcompress#1095 ## New Contributors * @HeroponRikiBestest made their first contribution in adamhathcock/sharpcompress#1060 * @drone1400 made their first contribution in adamhathcock/sharpcompress#1063 **Full Changelog**: adamhathcock/sharpcompress@0.42.0...0.43.0 ## 0.42.1 ## What's Changed * Fix: Should not throw on ARJ detection by @adamhathcock in adamhathcock/sharpcompress#1067 **Full Changelog**: adamhathcock/sharpcompress@0.42.0...0.42.1 ## 0.42.0 This is one where I leaned heavily on AI for asynchronous implementation and bug fixes. ARJ is provided by @TwanVanDongen ## What's Changed * Configure Dependabot for NuGet updates by @adamhathcock in adamhathcock/sharpcompress#950 * Bump actions/setup-dotnet from 4 to 5 by @dependabot[bot] in adamhathcock/sharpcompress#957 * Bump actions/checkout from 4 to 5 by @dependabot[bot] in adamhathcock/sharpcompress#952 * Only allow extract all on archives that are solid (some rars and 7zip only) by @adamhathcock in adamhathcock/sharpcompress#964 * Remove a dynamically created stackalloc by @adamhathcock in adamhathcock/sharpcompress#966 * Bump AwesomeAssertions from 9.2.0 to 9.2.1 by @dependabot[bot] in adamhathcock/sharpcompress#961 * Reduce custom utilities for arrays/bytes by @adamhathcock in adamhathcock/sharpcompress#967 * rework dependencies to be correct for frameworks and update by @adamhathcock in adamhathcock/sharpcompress#968 * Removed wrappers that weren't needed (probably) by @adamhathcock in adamhathcock/sharpcompress#959 * Add JB perf testing project. by @adamhathcock in adamhathcock/sharpcompress#969 * Handle vendor-specific and malformed ZIP extra fields safely by @TwanVanDongen in adamhathcock/sharpcompress#972 * chore: add Copilot coding agent config and CI workflow by @adamhathcock in adamhathcock/sharpcompress#974 * Add Copilot agent manifest and usage documentation by @Copilot in adamhathcock/sharpcompress#977 * Bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in adamhathcock/sharpcompress#979 * Add comprehensive async/await support for Stream I/O operations by @Copilot in adamhathcock/sharpcompress#978 * adds more async tests and overloads to make things writable and async by @adamhathcock in adamhathcock/sharpcompress#980 * Support CompressionType.None for uncompressed 7z files by @Copilot in adamhathcock/sharpcompress#986 * Configure Copilot coding agent instructions for SharpCompress by @Copilot in adamhathcock/sharpcompress#983 * Fix GZip extraction NotSupportedException for non-seekable streams by @Copilot in adamhathcock/sharpcompress#987 * Make all library exceptions inherit from SharpCompressException by @Copilot in adamhathcock/sharpcompress#990 * Add support for empty directory entries in archives by @Copilot in adamhathcock/sharpcompress#989 * Fix extraction failure on Windows due to case-sensitive path comparison by @Copilot in adamhathcock/sharpcompress#988 * Add more Async tests and complete Zip tests by @adamhathcock in adamhathcock/sharpcompress#991 * make test linux only by @adamhathcock in adamhathcock/sharpcompress#993 * Fix Windows test failures due to ArrayPool buffer sizing by @Copilot in adamhathcock/sharpcompress#1000 * Add Async RAR and more by @adamhathcock in adamhathcock/sharpcompress#996 * async bzip2 and add by @adamhathcock in adamhathcock/sharpcompress#1002 * Fix ArchiveFactory.Open double-wrapping causing "Cannot determine compressed stream type" on Linux by @Copilot in adamhathcock/sharpcompress#997 * Adding the ARJ (Archived by Robert Jung) format by @TwanVanDongen in adamhathcock/sharpcompress#994 * async lzma by @adamhathcock in adamhathcock/sharpcompress#1003 * Refactor SqueezeStream for CLS Compliance, Streaming, and Generic Test Coverage by @TwanVanDongen in adamhathcock/sharpcompress#1005 * ARJ multi-part archive handling improved by @TwanVanDongen in adamhathcock/sharpcompress#1006 * ArjReader throws exception for password protected archives. by @TwanVanDongen in adamhathcock/sharpcompress#1007 * Fix some IStreamStack and SharpCompressStream functions by @Morilli in adamhathcock/sharpcompress#1017 * ARJ's methods 1, 2 and 3 implemented for streaming by @TwanVanDongen in adamhathcock/sharpcompress#1019 * Async XZ by @adamhathcock in adamhathcock/sharpcompress#1004 * Fix memory exhaustion in TAR header auto-detection by @Copilot in adamhathcock/sharpcompress#1024 * Fix ArgumentNullException when disposing RarArchive with damaged archives by @Copilot in adamhathcock/sharpcompress#1025 * Buffer boundary tests by @TwanVanDongen in adamhathcock/sharpcompress#1028 * Added buffer boundary tests. by @TwanVanDongen in adamhathcock/sharpcompress#1030 * Update csharpier and reformat by @adamhathcock in adamhathcock/sharpcompress#1035 * Bump actions/checkout from 5 to 6 by @dependabot[bot] in adamhathcock/sharpcompress#1031 * Bump AwesomeAssertions from 9.2.1 to 9.3.0 by @dependabot[bot] in adamhathcock/sharpcompress#1009 * Fix version mismatch between Local File Header and Central Directory File Header in Zip archives by @Copilot in adamhathcock/sharpcompress#1023 * Fix DivideByZeroException when compressing empty files with BZip2 by @Copilot in adamhathcock/sharpcompress#1043 ## New Contributors ... (truncated) ## 0.41.0 ## What's Changed * Fix volume FileName property potentially missing by @Morilli in adamhathcock/sharpcompress#921 * Fix 7-zip solid archive detection by @Morilli in adamhathcock/sharpcompress#924 * fix DotSettings options to conform to current code style and editorconfig by @Morilli in adamhathcock/sharpcompress#928 * Fix zipentry comment implementation by @Morilli in adamhathcock/sharpcompress#929 * Added ArgumentException to Archive.Open implementations by @SimonCahill in adamhathcock/sharpcompress#931 * Implement `Attrib` for `ZipEntry` by @Morilli in adamhathcock/sharpcompress#933 * Added IStreamStack for debugging and configurable buffer management. … by @Nanook in adamhathcock/sharpcompress#930 * Zip ZStandard Writing with tests. Level support. by @Nanook in adamhathcock/sharpcompress#934 * Fix WinzipAesCryptoStream potentially not getting disposed by @Morilli in adamhathcock/sharpcompress#939 * Rewind buffer fix for directory extract. by @Nanook in adamhathcock/sharpcompress#935 * ZStandard tar support by @mitchcapper in adamhathcock/sharpcompress#943 * Extension hinting for ReaderFactory for better first try factory success by @mitchcapper in adamhathcock/sharpcompress#945 * Update dependencies and csharpier by @adamhathcock in adamhathcock/sharpcompress#947 * update to 0.41.0 and change symbols type by @adamhathcock in adamhathcock/sharpcompress#948 ## New Contributors * @SimonCahill made their first contribution in adamhathcock/sharpcompress#931 * @mitchcapper made their first contribution in adamhathcock/sharpcompress#943 **Full Changelog**: adamhathcock/sharpcompress@0.40.0...0.41.0 ## 0.40.0 ## What's Changed * don't run net48 on non-windows by @adamhathcock in adamhathcock/sharpcompress#892 * Fix zip entry handling for entries with data descriptors by @Morilli in adamhathcock/sharpcompress#891 * Fix for Rar4 v20 compression. by @Nanook in adamhathcock/sharpcompress#893 * use File.OpenRead instead of File.Open in tests to allow concurrent access by @Morilli in adamhathcock/sharpcompress#895 * Fix condition in rar v3 code by @Morilli in adamhathcock/sharpcompress#894 * Rar2 v20,v26 Multimedia (Audio) decoder fix by @Nanook in adamhathcock/sharpcompress#896 * Implement ReadByte for LzmaStream and LzOutWindow by @Morilli in adamhathcock/sharpcompress#898 * Implement ReadByte for BufferedSubStream by @Morilli in adamhathcock/sharpcompress#897 * make WriteToDirectory functions use ExtractAllEntries by @Morilli in adamhathcock/sharpcompress#900 * Handle XZ CheckType SHA-256 by @ms264556 in adamhathcock/sharpcompress#901 * Provide access to extended attributes for 7-zip by @jdpurcell in adamhathcock/sharpcompress#904 * Base Reader implementation of .ARC format by @TwanVanDongen in adamhathcock/sharpcompress#903 * ARC decompression methods 3 and 4 added by @TwanVanDongen in adamhathcock/sharpcompress#905 * Added ARC's crunched methods 5, 6, 7 & 8 by @TwanVanDongen in adamhathcock/sharpcompress#906 * Optimize LZ OutWindow.CopyBlock by @jdpurcell in adamhathcock/sharpcompress#907 * Optimize LZMA range decoder by @jdpurcell in adamhathcock/sharpcompress#910 * Update USAGE.md to remove problematic extraction example by @Morilli in adamhathcock/sharpcompress#909 * Optimize BufferedSubStream.ReadByte by @jdpurcell in adamhathcock/sharpcompress#912 * Fix regression with BufferedSubStream calculation by @jdpurcell in adamhathcock/sharpcompress#913 * Add SharpCompressException and use it or children in most places by @adamhathcock in adamhathcock/sharpcompress#834 * return Stream.Null when 7z entry has no stream by @zgabi in adamhathcock/sharpcompress#854 * Implement multipart rar handling for ExtractAllEntries by @Morilli in adamhathcock/sharpcompress#916 * [bzip2] fix possible out of bounds access due to unsanitized nSelectors usage by @Morilli in adamhathcock/sharpcompress#918 * Update dependencies and csharpier by @adamhathcock in adamhathcock/sharpcompress#914 ## New Contributors * @ms264556 made their first contribution in adamhathcock/sharpcompress#901 * @jdpurcell made their first contribution in adamhathcock/sharpcompress#904 * @zgabi made their first contribution in adamhathcock/sharpcompress#854 **Full Changelog**: adamhathcock/sharpcompress@0.39.0...0.40.0 ## 0.39.0 ## What's Changed * Restore stream position in ArchiveFactory.IsArchive by @Morilli in adamhathcock/sharpcompress#876 * Fixed bug in zip time header flags by @StarkDirewolf in adamhathcock/sharpcompress#877 * Exports unclutter by @YoshiRulz in adamhathcock/sharpcompress#884 * Fix XZBlock padding calculation when its stream's starting position % 4 != 0 by @Morilli in adamhathcock/sharpcompress#878 * Improve rar memory usage by @majorro in adamhathcock/sharpcompress#887 * Make helper classes internal by @majorro in adamhathcock/sharpcompress#889 * Update to support net48, net481, netstandard2.0, net6 and net8 by @adamhathcock in adamhathcock/sharpcompress#888 ## New Contributors * @StarkDirewolf made their first contribution in adamhathcock/sharpcompress#877 * @YoshiRulz made their first contribution in adamhathcock/sharpcompress#884 * @majorro made their first contribution in adamhathcock/sharpcompress#887 **Full Changelog**: adamhathcock/sharpcompress@0.38.0...0.39.0 ## 0.38.0 ## What's Changed * Tar: Add processing for the LongLink header type by @DannyBoyk in adamhathcock/sharpcompress#847 * Fix gzip archives having a `Type` of `ArchiveType.Tar` instead of `ArchiveType.Gzip` by @Morilli in adamhathcock/sharpcompress#848 * Fix for issue #844 by @Erior in adamhathcock/sharpcompress#849 * Issue 842 by @Erior in adamhathcock/sharpcompress#850 * Fixed extractions after first ZIP64 entry is read from stream by @pathartl in adamhathcock/sharpcompress#852 * Check crc on tar header by @Erior in adamhathcock/sharpcompress#855 * Fix for missing empty directories when using ExtractToDirectory by @alexprabhat99 in adamhathcock/sharpcompress#857 * Added Explode and (un)Reduce by @gjefferyes in adamhathcock/sharpcompress#853 * Fix #858 - Replaces invalid filename characters by @DineshSolanki in adamhathcock/sharpcompress#859 * Added support for 7zip SFX archives by @lostmsu in adamhathcock/sharpcompress#860 * Update csproj to get green marks and update deps by @adamhathcock in adamhathcock/sharpcompress#864 * Added shrink, reduce and implode to FORMATS by @TwanVanDongen in adamhathcock/sharpcompress#866 * Fix small typo in USAGE.md by @kikaragyozov in adamhathcock/sharpcompress#868 ## New Contributors * @Morilli made their first contribution in adamhathcock/sharpcompress#848 * @alexprabhat99 made their first contribution in adamhathcock/sharpcompress#857 * @gjefferyes made their first contribution in adamhathcock/sharpcompress#853 * @DineshSolanki made their first contribution in adamhathcock/sharpcompress#859 * @lostmsu made their first contribution in adamhathcock/sharpcompress#860 * @kikaragyozov made their first contribution in adamhathcock/sharpcompress#868 **Full Changelog**: adamhathcock/sharpcompress@0.37.2...0.38.0 ## 0.37.2 **Full Changelog**: adamhathcock/sharpcompress@0.37.1...0.37.2 ## 0.37.1 ## What's Changed * Prevent infinite loop when reading corrupted archive by @Blokyk in adamhathcock/sharpcompress#835 ## New Contributors * @Blokyk made their first contribution in adamhathcock/sharpcompress#835 **Full Changelog**: adamhathcock/sharpcompress@0.37.0...0.37.1 Updated ZstdSharp.Port to be native Private assets for github link? ## 0.37.0 ## What's Changed * Zip: Use last modified time from basic header when validating zip decryption by @DannyBoyk in adamhathcock/sharpcompress#805 * Support for decompressing Zip Shrink (Method:1) by @TwanVanDongen in adamhathcock/sharpcompress#807 * rar5 read FHEXTRA_REDIR and expose via RarEntry by @coderb in adamhathcock/sharpcompress#814 * rar5 improve memory usage by @coderb in adamhathcock/sharpcompress#816 * Code clean up by @adamhathcock in adamhathcock/sharpcompress#815 * #809 Add README.md to csproj for NuGet by @btomblinson in adamhathcock/sharpcompress#817 * Support added for TAR LZW compression (Unix 'compress' resulting in .… by @TwanVanDongen in adamhathcock/sharpcompress#819 * Add support for 7z ARM64 and RISCV filters by @klimatr26 in adamhathcock/sharpcompress#823 * Fix tar corruption when sizes mismatch by @adamhathcock in adamhathcock/sharpcompress#825 * Update README.md - Change API Docs to DNDocs by @NeuroXiq in adamhathcock/sharpcompress#829 * Remove ignored nulls by @adamhathcock in adamhathcock/sharpcompress#832 * Remove ~netstandard20~ just net7.0 by @adamhathcock in adamhathcock/sharpcompress#828 ## New Contributors * @klimatr26 made their first contribution in adamhathcock/sharpcompress#823 * @NeuroXiq made their first contribution in adamhathcock/sharpcompress#829 **Full Changelog**: adamhathcock/sharpcompress@0.36.0...0.37.0 ## 0.36.0 ## What's Changed * ZipWriter: Write correct EOCD record when more than 65,535 files by @DannyBoyk in adamhathcock/sharpcompress#792 * Feature/rar5 blake2 by @Erior in adamhathcock/sharpcompress#794 * Issue 771, remove throw on flush for readonly streams by @Erior in adamhathcock/sharpcompress#801 * Set Empty string for Rar5 password as default by @Erior in adamhathcock/sharpcompress#798 * Expose file attributes for rar by @Erior in adamhathcock/sharpcompress#800 * Fix reporting size / position by @Erior in adamhathcock/sharpcompress#799 * Add support for the UnixTimeExtraField in Zip files by @DannyBoyk in adamhathcock/sharpcompress#803 **Full Changelog**: adamhathcock/sharpcompress@0.35.0...0.36.0 ## 0.35.0 ## What's Changed * Dont crash on reading rar5 comment #783 by @Erior in adamhathcock/sharpcompress#784 * Handle tar files generated with tar -H oldgnu that has large uid/gid values by @Erior in adamhathcock/sharpcompress#785 * LZMA EOS marker detection by @Erior in adamhathcock/sharpcompress#786 * Bump actions/setup-dotnet from 3 to 4 by @dependabot in adamhathcock/sharpcompress#787 * RAR5 decryption support by @Erior in adamhathcock/sharpcompress#788 * Dotnet8 by @adamhathcock in adamhathcock/sharpcompress#789 **Full Changelog**: adamhathcock/sharpcompress@0.34.2...0.35.0 ## 0.34.2 ## What's Changed * Throw ReaderCancelledException on reader cancelled by @pathartl in adamhathcock/sharpcompress#778 * Update csharpier and fix formatting by @adamhathcock in adamhathcock/sharpcompress#781 * Revert change disabling strong name signing in 92df1ec by @caesay in adamhathcock/sharpcompress#780 ## New Contributors * @pathartl made their first contribution in adamhathcock/sharpcompress#778 * @caesay made their first contribution in adamhathcock/sharpcompress#780 **Full Changelog**: adamhathcock/sharpcompress@0.34.1...0.34.2 ## 0.34.1 ## What's Changed * Feature/761 by @Erior in adamhathcock/sharpcompress#768 * Update Zstd to 0.7.2 by @Erior in adamhathcock/sharpcompress#769 **Full Changelog**: adamhathcock/sharpcompress@0.34.0...0.34.1 ## 0.34.0 ## What's Changed * Check for broken file #736 by @Erior in adamhathcock/sharpcompress#737 * Make ArchiveFactory.IsArchive(Stream, ...) public. Fix #739 by @AlissaSabre in adamhathcock/sharpcompress#740 * Skip if we know the size, set blank password if not set for rar by @Erior in adamhathcock/sharpcompress#745 * Added simple example by @rodesfl in adamhathcock/sharpcompress#746 * Adds zstd (zstandard) support to zip/zipx and 7zip by @Nanook in adamhathcock/sharpcompress#723 * Add fast `ExtractToDirectoryAsync` extension method on `IArchive` by @FlsZen in adamhathcock/sharpcompress#750 * Bump actions/checkout from 3 to 4 by @dependabot in adamhathcock/sharpcompress#758 * Feature/748 by @Erior in adamhathcock/sharpcompress#759 * #751 Add .tar.7z support by @btomblinson in adamhathcock/sharpcompress#763 ## New Contributors * @AlissaSabre made their first contribution in adamhathcock/sharpcompress#740 * @rodesfl made their first contribution in adamhathcock/sharpcompress#746 * @FlsZen made their first contribution in adamhathcock/sharpcompress#750 * @btomblinson made their first contribution in adamhathcock/sharpcompress#763 **Full Changelog**: adamhathcock/sharpcompress@0.33.0...0.34.0 ## 0.33.0 I think the API didn't break with `IArchiveFactory` I've been out it for health reasons ## What's Changed * SourceStream Position counting bug fix by @Erior in adamhathcock/sharpcompress#687 * Access level to LzmaStream Decoder by @louis-michelbergeron in adamhathcock/sharpcompress#690 * Introduced IArchiveFactory by @vpenades in adamhathcock/sharpcompress#671 * 64bit datadescriptors by @Erior in adamhathcock/sharpcompress#689 * Ignores UnicodePathExtra if forced encoding is specified by @stakira in adamhathcock/sharpcompress#696 * Added support for reading comment header for Rar v5 archives by @IngBertolini in adamhathcock/sharpcompress#697 * Bump actions/setup-dotnet from 2 to 3 by @dependabot in adamhathcock/sharpcompress#699 * Use PackageLicenseExpression instead of PackageLicenseFile by @andreas-eriksson in adamhathcock/sharpcompress#706 * Generalized factories to readers and writers. by @vpenades in adamhathcock/sharpcompress#709 * Update to dotnet 7. Change net461 to net462. Remove netcoreapp3.1 by @adamhathcock in adamhathcock/sharpcompress#715 * replace Activator.CreateInstance to Func for avoiding error in NativeAOT by @itn3000 in adamhathcock/sharpcompress#716 * Several improvements to the LZMA Compressor by @ds5678 in adamhathcock/sharpcompress#717 * Zip Multipart fix, XZ stream fix, XZ stream support added to zip/zipx by @Nanook in adamhathcock/sharpcompress#722 * Add support for 7ZipDelta decompress by @Erior in adamhathcock/sharpcompress#726 * Fixed support for RAR 1.5 (algo15) by @TwanVanDongen in adamhathcock/sharpcompress#729 * Implement Searching Data Descriptor stream issue/pull #680 by @Erior in adamhathcock/sharpcompress#727 * Increase character value to support rar file with more than 100 parts… by @Erior in adamhathcock/sharpcompress#733 * Remove check for minimal distance and add test case generated by 7z as compatibility check by @Erior in adamhathcock/sharpcompress#735 ## New Contributors * @vpenades made their first contribution in adamhathcock/sharpcompress#671 * @stakira made their first contribution in adamhathcock/sharpcompress#696 * @IngBertolini made their first contribution in adamhathcock/sharpcompress#697 * @TwanVanDongen made their first contribution in adamhathcock/sharpcompress#729 **Full Changelog**: adamhathcock/sharpcompress@0.32.2...0.33.0 ## 0.32.2 ## What's Changed * ReadOnlySubStream overrides and adds logic #636 by @Erior in adamhathcock/sharpcompress#675 * Fix LZMADecoder Code function by @louis-michelbergeron in adamhathcock/sharpcompress#679 * RarArchive has Min/MaxVersion. RarEntry has Volumne Indexes. GZ CRC fix. by @Nanook in adamhathcock/sharpcompress#682 * Include license in nuget package by @daverant in adamhathcock/sharpcompress#684 * WriteAll: use delegate instead of Expression by @OwnageIsMagic in adamhathcock/sharpcompress#683 * Mitigation of problems by @Erior in adamhathcock/sharpcompress#686 ## New Contributors * @daverant made their first contribution in adamhathcock/sharpcompress#684 * @OwnageIsMagic made their first contribution in adamhathcock/sharpcompress#683 **Full Changelog**: adamhathcock/sharpcompress@0.32.1...0.32.2 ## 0.32.1 ## What's Changed * Feature/malformed zip file generated by @Erior in adamhathcock/sharpcompress#673 * Suppress nested NonDisposingStream by @MartinDemberger in adamhathcock/sharpcompress#674 * Corrected skip-marker on skip of uncompressed ZIP file with missing size informations. by @MartinDemberger in adamhathcock/sharpcompress#672 ## New Contributors * @MartinDemberger made their first contribution in adamhathcock/sharpcompress#674 **Full Changelog**: adamhathcock/sharpcompress@0.32...0.32.1 ## 0.32 ## What's Changed * Add a net 6 target and make trimmable by @ds5678 in adamhathcock/sharpcompress#652 * Tar file mode, user and group by @Ryhon0 in adamhathcock/sharpcompress#655 * Added Split archive support with unit tests. … by @Nanook in adamhathcock/sharpcompress#658 * Dependency updates and start of enforcing some C# standards by @adamhathcock in adamhathcock/sharpcompress#659 * Bump actions/upload-artifact from 2 to 3 by @dependabot in adamhathcock/sharpcompress#660 * Added multipart Zip support (z01...). Added IEntry.IsSolid by @Nanook in adamhathcock/sharpcompress#661 * Properly integrated zip multivolume and general split support. by @Nanook in adamhathcock/sharpcompress#662 * Align behavour of 7Zip exception with encrypted filenames arc with rar when no password provided by @Nanook in adamhathcock/sharpcompress#663 * XZ decoding BCJ filters support by @louis-michelbergeron in adamhathcock/sharpcompress#669 ## New Contributors * @ds5678 made their first contribution in adamhathcock/sharpcompress#652 * @Ryhon0 made their first contribution in adamhathcock/sharpcompress#655 * @dependabot made their first contribution in adamhathcock/sharpcompress#660 * @louis-michelbergeron made their first contribution in adamhathcock/sharpcompress#669 **Full Changelog**: adamhathcock/sharpcompress@0.31...0.32 ## 0.31 ## What's Changed * Rar2 fix with new unit tests that fail on previous build. by @Nanook in adamhathcock/sharpcompress#638 * Update Adler32 from ImageSharp v2.1.0 by @loop-evgeny in adamhathcock/sharpcompress#651 ## New Contributors * @loop-evgeny made their first contribution in adamhathcock/sharpcompress#651 **Full Changelog**: adamhathcock/sharpcompress@0.30.1...0.31 ## 0.30.1 ## What's Changed * Add test and probable fix for Issue 617 by @adamhathcock in adamhathcock/sharpcompress#624 **Full Changelog**: adamhathcock/sharpcompress@0.30.0...0.30.1 ## 0.30 I accepted a PR to add `net461` back as there's still multi-targetting issues. I guess .NET Standard 2.0 never really worked out. Included that and a fix: - Add net461 target to clean up issues with system.* nuget dependencies adamhathcock/sharpcompress#621 - Fix for chunked read for ZLibBaseStream adamhathcock/sharpcompress#616 https://www.nuget.org/packages/SharpCompress/0.30.0 Commits viewable in [compare view](adamhathcock/sharpcompress@0.29.0...0.48.0). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/dekthaiinchina/GoldbergGUI/network/alerts). </details>
For some formats, async should be all the way. 7Zip needs fixing
This pull request introduces asynchronous detection methods for multiple archive and compression formats, allowing non-blocking checks to determine file types. It also refactors and simplifies some synchronous detection logic for improved performance and consistency. The most significant changes are grouped below:
Asynchronous Format Detection:
Added
IsArchiveAsyncor similar async methods for ACE (AceHeader.cs), ARJ (ArjHeader.cs), BZip2 (BZip2Stream.cs), LZip (LZipStream.cs), LZW (LzwStream.cs), ZStandard (ZStandardStream.cs), RAR (RarArchive.Factory.cs), SevenZip (SevenZipArchive.Factory.cs), TAR (TarArchive.Factory.cs), and XZ (XZStream.cs) formats, enabling asynchronous file type checks withCancellationTokensupport. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Updated the ACE and ARJ factories to implement and expose these new asynchronous detection methods. [1] [2]
Synchronous Detection Refactoring & Performance:
ArrayPool<byte>.Shared) for ARC and SevenZip formats, reducing allocations and improving performance. [1] [2]API Consistency and Interface Changes:
CancellationTokenparameter from theIArchiveFactory.OpenAsyncArchivemethod and its implementations to simplify the API, as the token was not being used in actual asynchronous operations. [1] [2] [3]General Codebase Improvements:
usingdirectives forSystem.ThreadingandSystem.Threading.Taskswhere needed to support the new asynchronous methods. [1] [2] [3] [4] [5] [6] [7]These changes collectively modernize the archive/compression format detection APIs and improve their efficiency and usability.