Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Code Quality ObservationsThe implementation follows SharpCompress patterns correctly:
No inline comments were necessary as no issues were identified. |
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive asynchronous write support for 7Zip archives, enabling users to create 7z files using async APIs. The implementation closely mirrors the existing synchronous implementation while properly supporting true async I/O operations and cancellation.
Changes:
- Added
CompressAsyncmethod toSevenZipStreamsCompressorfor async LZMA/LZMA2 compression with cancellation support - Implemented
WriteAsyncmethod inSevenZipWriterthat mirrors the syncWritelogic with proper async compression - Added comprehensive test suite (
SevenZipWriterAsyncTests) covering round-trip scenarios, factory integration, async-only streams, and cancellation - Updated documentation in
FORMATS.mdandSharpCompress.csprojto reflect 7Zip write support
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/SharpCompress.Test/SevenZip/SevenZipWriterAsyncTests.cs | New test suite covering async write scenarios including round-trip, directories, factory integration, async-only streams, and cancellation |
| src/SharpCompress/Writers/SevenZip/SevenZipWriter.Async.cs | Async implementation of WriteAsync with proper compression pipeline and WriteDirectoryAsync delegating to sync version |
| src/SharpCompress/Common/SevenZip/SevenZipStreamsCompressor.cs | Added CompressAsync method with async CRC calculation helper (CopyWithCrcAsync) |
| src/SharpCompress/SharpCompress.csproj | Updated project description to mention 7zip write support |
| docs/FORMATS.md | Updated format documentation to clarify 7Zip write support availability and limitations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds asynchronous write support for 7Zip archives, allowing users to create 7z files using async APIs. It introduces an async compression pipeline for LZMA/LZMA2, updates documentation and metadata to reflect 7Zip write support, and provides comprehensive tests to verify async functionality.
Async 7Zip Write Support
CompressAsyncmethod toSevenZipStreamsCompressor, enabling asynchronous compression of streams using LZMA/LZMA2 with cancellation support.SevenZipWriter.WriteAsyncto fully support async file entry writing, including cancellation and proper handling of empty files.Testing
SevenZipWriterAsyncTestswith multiple tests covering async round-trip, directory support, factory integration, async source reads, and cancellation behavior.Documentation and Metadata
docs/FORMATS.mdto clarify that 7Zip write support is available viaSevenZipWriterfor non-solid archives and requires a seekable output stream.SharpCompress.csprojto mention 7Zip write support.Internal Improvements
CopyWithCrcAsyncfor efficient CRC calculation during async compression.