mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #980] [MERGED] adds more async tests and overloads to make things writable and async #1395
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/980
Author: @adamhathcock
Created: 10/27/2025
Status: ✅ Merged
Merged: 10/27/2025
Merged by: @adamhathcock
Base:
master← Head:async-gzip-tests📝 Commits (5)
f21b982adds more async tests and overloads to make things writable and async9af3520Merge branch 'master' into async-gzip-tests1618241add tar specific tests9c18daaMerge remote-tracking branch 'origin/async-gzip-tests' into async-gzip-testsab03c12add more tests📊 Changes
16 files changed (+1189 additions, -0 deletions)
View changed files
📝
src/SharpCompress/Archives/AbstractWritableArchive.cs(+22 -0)📝
src/SharpCompress/Archives/GZip/GZipArchive.cs(+34 -0)📝
src/SharpCompress/Archives/IArchiveEntryExtensions.cs(+67 -0)📝
src/SharpCompress/Archives/IWritableArchive.cs(+8 -0)📝
src/SharpCompress/Archives/IWritableArchiveExtensions.cs(+20 -0)📝
src/SharpCompress/Archives/Tar/TarArchive.cs(+26 -0)📝
src/SharpCompress/Archives/Zip/ZipArchive.cs(+20 -0)📝
src/SharpCompress/Writers/Tar/TarWriter.cs(+36 -0)📝
tests/SharpCompress.Test/ArchiveTests.cs(+53 -0)➕
tests/SharpCompress.Test/GZip/GZipArchiveAsyncTests.cs(+127 -0)➕
tests/SharpCompress.Test/GZip/GZipWriterAsyncTests.cs(+83 -0)📝
tests/SharpCompress.Test/ReaderTests.cs(+68 -0)➕
tests/SharpCompress.Test/Tar/TarArchiveAsyncTests.cs(+223 -0)➕
tests/SharpCompress.Test/Tar/TarReaderAsyncTests.cs(+272 -0)➕
tests/SharpCompress.Test/Tar/TarWriterAsyncTests.cs(+83 -0)📝
tests/SharpCompress.Test/WriterTests.cs(+47 -0)📄 Description
This pull request adds asynchronous support for saving and extracting archives in the SharpCompress library. It introduces new async methods for writing archive entries and saving entire archives, enabling non-blocking I/O operations and cancellation support. The changes span core archive types (Zip, Tar, GZip), extension methods, and add comprehensive async extraction capabilities.
Async archive saving and extraction:
SaveToAsyncmethods toIWritableArchive,AbstractWritableArchive, and their extension classes, allowing archives to be saved asynchronously to streams and files with cancellation support. [1] [2] [3]SaveToAsyncoverrides forZipArchive,TarArchive, andGZipArchiveto asynchronously write archive entries using their respective writers. [1] [2] [3]Async entry extraction:
WriteToAsync,WriteToDirectoryAsync, andWriteToFileAsyncextension methods toIArchiveEntryExtensions, enabling asynchronous extraction of archive entries to streams, directories, or files. [1] [2] [3]Async writer support:
TarWriterwithWriteAsyncmethods for writing entries asynchronously, supporting progress, cancellation, and stream size validation.Testing improvements:
ArchiveTests.csto verify asynchronous archive extraction and ensure correctness of the new async APIs.These changes modernize the library for better scalability and responsiveness in applications that use SharpCompress for large or remote archives.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.