Skip to content

Upgrade SharpCompress to 0.47.4 and migrate extractor APIs to new OpenReader/OpenArchive surface#205

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/upgrade-sharpcompress-0-47-4
Draft

Upgrade SharpCompress to 0.47.4 and migrate extractor APIs to new OpenReader/OpenArchive surface#205
Copilot wants to merge 2 commits intomainfrom
copilot/upgrade-sharpcompress-0-47-4

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

SharpCompress 0.47.4 introduces breaking API changes (Open replacements and interface-based archive returns). This PR updates RecursiveExtractor to the new API surface while preserving existing extraction behavior across supported archive types.

  • Dependency update

    • Bumped SharpCompress from 0.44.5 to 0.47.4 in RecursiveExtractor.csproj.
  • Reader API migration (forward readers)

    • Updated reader-based extractors to use OpenReader(...):
      • AceReader, ArcReader, ArjReader
    • Updated ZIP forward scan path to use ReaderFactory.OpenReader(...) (non-indexed entry discovery path).
  • Archive API migration (archive model)

    • Updated archive-based extractors to use OpenArchive(...):
      • ZipArchive, TarArchive, RarArchive, SevenZipArchive
    • Adjusted call sites to handle the new interface-returning methods with concrete-type casting where needed by existing code paths.
  • BZip2 API migration

    • Replaced removed constructor usage with BZip2Stream.Create(...) in sync and async flows.
// Before
zipArchive = ZipArchive.Open(fileEntry.Content, new ReaderOptions { LeaveStreamOpen = true });

// After
zipArchive = (ZipArchive)ZipArchive.OpenArchive(
    fileEntry.Content,
    new ReaderOptions { LeaveStreamOpen = true });

Copilot AI assigned Copilot and gfs Apr 23, 2026
Copilot AI linked an issue Apr 23, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Upgrade to SharpCompress 0.47.4 and address breaking changes Upgrade SharpCompress to 0.47.4 and migrate extractor APIs to new OpenReader/OpenArchive surface Apr 23, 2026
Copilot AI requested a review from gfs April 23, 2026 06:58
Copilot finished work on behalf of gfs April 23, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to SharpCompress 0.47.4

2 participants