mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #1044] [MERGED] Unified progress reporting for compression and extraction operations #1469
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/1044
Author: @Copilot
Created: 11/27/2025
Status: ✅ Merged
Merged: 12/19/2025
Merged by: @adamhathcock
Base:
master← Head:copilot/add-progress-reporting📝 Commits (10+)
d4380b6Initial planc082d42Changes before error encountered0d487dfAdd IProgress support for compression operations with tests0f374b2Address code review: ProgressReportingStream now throws on writesaa0356dChanges before error encountered8fc5ca5Unify progress reporting: remove IExtractionListener and add IProgress support for reading7af029bAddress code review: properly handle zero-sized entries in progress reportinge2df789Remove IArchiveExtractionListener and add IProgress support to Archive Entry extraction0fdf9c7Address code review: Replace dynamic with IArchiveProgressInfo interface14d432ePass progress as parameter to WriteTo/WriteToAsync instead of storing on archive📊 Changes
29 files changed (+987 additions, -475 deletions)
View changed files
📝
AGENTS.md(+3 -1)📝
build/Program.cs(+11 -2)📝
src/SharpCompress/Archives/AbstractArchive.cs(+4 -41)📝
src/SharpCompress/Archives/IArchive.cs(+0 -6)📝
src/SharpCompress/Archives/IArchiveEntryExtensions.cs(+66 -30)➖
src/SharpCompress/Archives/IArchiveExtractionListener.cs(+0 -10)📝
src/SharpCompress/Archives/Rar/RarArchiveEntry.cs(+4 -4)➖
src/SharpCompress/Common/ArchiveExtractionEventArgs.cs(+0 -10)➖
src/SharpCompress/Common/CompressedBytesReadEventArgs.cs(+0 -25)➖
src/SharpCompress/Common/FilePartExtractionBeginEventArgs.cs(+0 -28)➖
src/SharpCompress/Common/IExtractionListener.cs(+0 -7)➕
src/SharpCompress/Common/ProgressReport.cs(+43 -0)➖
src/SharpCompress/Common/ReaderExtractionEventArgs.cs(+0 -17)📝
src/SharpCompress/Compressors/Rar/MultiVolumeReadOnlyStream.cs(+1 -37)➖
src/SharpCompress/IO/ListeningStream.cs(+0 -97)➕
src/SharpCompress/IO/ProgressReportingStream.cs(+160 -0)📝
src/SharpCompress/Readers/AbstractReader.cs(+42 -52)📝
src/SharpCompress/Readers/IReader.cs(+0 -5)➖
src/SharpCompress/Readers/IReaderExtractionListener.cs(+0 -8)📝
src/SharpCompress/Readers/Rar/RarReader.cs(+2 -4)...and 9 more files
📄 Description
Unified progress reporting for compression and extraction operations
Adds unified progress reporting support using the
IProgress<T>interface for both compression and extraction operations, similar to what 7-Zip's GUI provides.Changes Made
New Progress Reporting API
ProgressReportclass: Reports progress withEntryPath,BytesTransferred,TotalBytes, andPercentCompletepropertiesProgressReportingStream: Internal stream wrapper that tracks read operations and reports progressWriterOptions.Progress:IProgress<ProgressReport>?property for compression progressReaderOptions.Progress:IProgress<ProgressReport>?property for reader-based extraction progressIArchiveEntry.WriteTo/WriteToAsync: Now accept optionalIProgress<ProgressReport>?parameter for archive entry extraction progressRemoved Old Event-Based Progress Reporting
IExtractionListener,IReaderExtractionListener,IArchiveExtractionListenerinterfacesReaderProgress,ListeningStream,ArchiveExtractionEventArgsclassesCompressedBytesReadEventArgsandFilePartExtractionBeginEventArgsIArchiveandIReaderinterfacesMultiVolumeReadOnlyStream,RarArchiveEntry,RarReaderto remove listener dependenciesMerged from Master
Fixes #1027
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.