Commit Graph

2911 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
9eb4abe49e Fix RAR5 async decompression corruption in UnpWriteBufAsync
Three bugs in the async version of UnpWriteBuf (used only in the async
decompression path) were causing data corruption when decompressing RAR5
archives containing executable filters (E8/E8E9/ARM) whose blocks spanned
the 4MB write boundary (UNPACK_MAX_WRITE):

1. WrittenFileSize was only incremented inside `if (OutMem != null)`, but
   should always be incremented after ApplyFilter (matching sync behavior).

2. UnpSomeRead = true was missing from the filter processing path.

3. In the NotAllFiltersProcessed else branch (filter intersects write border):
   - WrPtr was not updated to WrittenBorder, corrupting the window pointer
     used to compute WriteBorder on the next flush cycle
   - Remaining filters had NextWindow set to true (inverted logic), when
     sync correctly sets them to false so they are processed next time

All three changes align the async path with the sync UnpWriteBuf logic.
2026-08-01 03:40:04 +00:00
copilot-swe-agent[bot]
5445d2b77e Initial plan 2026-08-01 03:11:40 +00:00
Adam Hathcock
187055e673 Merge pull request #1389 from adamhathcock/copilot/fix-review-comment-3670216142
Honor cancellation in BufferedSubStream async cached-read fast paths
2026-07-30 14:52:52 +01:00
Adam Hathcock
82a94606ba Merge pull request #1388 from julianxhokaxhiu/feat/lzma-perf-improvements
Improve LZMA decoding for Solid Archives
2026-07-29 10:52:52 +01:00
copilot-swe-agent[bot]
a688c7c657 Fix BufferedSubStream ReadAsync cancellation fast-path 2026-07-29 07:55:48 +00:00
copilot-swe-agent[bot]
2f545b553a Initial plan 2026-07-29 07:51:15 +00:00
Julian Xhokaxhiu
f5289ef49e Improve LZMA decoding for Solid Archives 2026-07-29 02:36:25 +02:00
Adam Hathcock
f4699ad12d Merge pull request #1380 from adamhathcock/adam/sol-cleanup
Updates recommended by 5.6 Sol
2026-07-28 15:21:28 +01:00
Adam Hathcock
e1ba6d3407 Merge pull request #1383 from adamhathcock/adam/sync-generator
Use more Sync Generator
2026-07-28 15:18:20 +01:00
Adam Hathcock
d5c82b89f6 update generation docs 2026-07-28 15:12:04 +01:00
Adam Hathcock
c21370093d Merge remote-tracking branch 'origin/master' into adam/sync-generator 2026-07-28 15:06:49 +01:00
Adam Hathcock
bb22169ad0 Merge remote-tracking branch 'origin/adam/sol-cleanup' into adam/sol-cleanup 2026-07-28 14:15:06 +01:00
Adam Hathcock
cfd1699e10 fix extension method usage 2026-07-28 14:14:55 +01:00
Adam Hathcock
0a7be79e34 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-28 14:11:56 +01:00
Adam Hathcock
c7c1397e1d Merge remote-tracking branch 'origin/master' into adam/sol-cleanup 2026-07-28 14:10:39 +01:00
Adam Hathcock
be99b9a5dc Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-28 13:19:41 +01:00
Adam Hathcock
cf3dfc0dfa Merge pull request #1382 from virzak/chore/bump-sync-method-generator
Update Zomp.SyncMethodGenerator to 2.0.42
2026-07-28 13:18:57 +01:00
Adam Hathcock
9e3a92ac10 Fix restore 2026-07-28 13:13:17 +01:00
Adam Hathcock
17b8531271 add extra info about sync over async 2026-07-28 12:56:23 +01:00
Victor Irzak
9f74d58eae Update Zomp.SyncMethodGenerator to 2.0.42
Two releases since the generator was adopted here, both fixing things this
repository ran into.

2.0.41 emits the using directives of the source file into the generated one.
Documentation is copied across verbatim and a cref in it resolves against the
file it lands in, so crefs which relied on a using went unresolved and the
compiler reported CS1574 for each.

2.0.42 spaces a rewritten argument list the way it was written. The generated
extension calls here were coming out as

  IArchiveEntryExtensions.WriteTo(archiveEntry,                     streamToWriteTo,
          Constants.BufferSize,
          progress: progress)                ;

and now come out as

  IArchiveEntryExtensions.WriteTo(archiveEntry, streamToWriteTo,
          Constants.BufferSize,
          progress: progress);

No change to what is generated, only to how it is spaced and what its
documentation can refer to. Full test suite passes unchanged.
2026-07-28 07:20:06 -04:00
Adam Hathcock
7ea660c049 batch 2: IO and streams 2026-07-28 12:19:33 +01:00
Adam Hathcock
d6f79a5467 commit plan 2026-07-28 11:52:02 +01:00
Adam Hathcock
ea44ec098b first pass of sync generator 2026-07-28 11:26:51 +01:00
Adam Hathcock
0037141ac4 Merge pull request #1381 from virzak/feature/sync-method-generator
Generate the synchronous archive entry extensions from the async ones
2026-07-28 10:22:17 +01:00
Adam Hathcock
cf2dfa0c30 redid the restore 2026-07-28 10:08:16 +01:00
Adam Hathcock
e783200cd2 minor fixes 2026-07-28 09:59:36 +01:00
Victor Irzak
c303856c5f Generate the synchronous archive entry extensions from the async ones
The five synchronous WriteTo/WriteToDirectory/WriteToFile overloads were
maintained by hand alongside their async counterparts, which had drifted:
the async ones report progress through ExtractionOptions.BufferSize while
the sync ones did not, and each fix has had to be made twice.

Zomp.SyncMethodGenerator produces the synchronous copy from the async
source at compile time. The async methods are the only ones written out;
the sync versions are emitted into the same partial class, keeping the
public API identical - same names, same overloads, same signatures.

The generator is a build-time only dependency (PrivateAssets="all"), so
it adds nothing to the shipped package and no runtime reference.

Documentation summaries lose the word "asynchronously" because a summary
is now shared by both copies of the method.
2026-07-27 23:42:23 -04:00
Adam Hathcock
5ba71a0431 Updates recommended 2026-07-27 08:53:52 +01:00
Adam Hathcock
6062623dd8 Merge pull request #1376 from adamhathcock/copilot/fix-uncompress-tar-gz-error
Fix tar.gz reader detection for GZip archive entry streams
0.50.1
2026-07-25 17:27:43 +01:00
Adam Hathcock
fe75f28ac9 DataDescriptor should always be non-seekable 2026-07-25 17:08:50 +01:00
Adam Hathcock
ba221b27af Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-24 09:34:18 +01:00
copilot-swe-agent[bot]
3e61a72248 test: broaden transformed stream reader coverage 2026-07-24 07:35:07 +00:00
copilot-swe-agent[bot]
3375aaa90c fix: preserve transformed streams in reader detection 2026-07-24 07:18:02 +00:00
copilot-swe-agent[bot]
0bb5b62842 Initial plan 2026-07-24 07:09:41 +00:00
Adam Hathcock
bb7be935a3 Merge pull request #1372 from adamhathcock/adam/pr-1369
Fixes ZipWriter to be fully forward only
2026-07-23 10:23:12 +01:00
Adam Hathcock
152a66f802 add more tests 2026-07-23 10:17:28 +01:00
Adam Hathcock
4f1d0d32ce Merge pull request #1371 from adamhathcock/copilot/fix-readerfactory-flat-gzip-issue
Fix ArgumentException in ZlibBaseStream when disposing mid-stream GZip probe in ReaderFactory
2026-07-23 10:14:02 +01:00
Adam Hathcock
e3b7a560ba Fix legacy build issue 2026-07-23 10:04:06 +01:00
copilot-swe-agent[bot]
31d12c78d8 Apply remaining changes 2026-07-23 09:00:44 +00:00
Adam Hathcock
02f1a1616a Fixes ZipWriter to be fully forward only 2026-07-23 09:28:04 +01:00
copilot-swe-agent[bot]
b86a871e22 Fix GZipFactory flat gzip probe disposal regression 2026-07-23 08:02:01 +00:00
Adam Hathcock
2faa327ca5 remove RTK hook 2026-07-23 08:53:09 +01:00
copilot-swe-agent[bot]
250cfaba19 Initial plan 2026-07-22 05:28:18 +00:00
Adam Hathcock
073d99153b Merge pull request #1360 from adamhathcock/adam/remove-compressed-tar-archive
Remove compressed tar archive
0.50.0-beta1 0.50.0
2026-07-12 11:55:04 +01:00
Adam Hathcock
581a6dc945 Further advice from Sol 2026-07-12 11:35:46 +01:00
Adam Hathcock
fda3d186c5 more tests and a removal of a test 2026-07-12 11:09:49 +01:00
Adam Hathcock
35aa0ca4ad Merge pull request #1362 from LANCommander/fix-zip64-streaming-corrupted-entry-sizes
Zip: fix Zip64 streaming reader corrupting entry size/CRC and failing on non-seekable streams
2026-07-02 11:44:20 +01:00
Pat Hartl
c59aa78928 Zip: fix Zip64 streaming reader corrupting entry size/CRC and failing on non-seekable streams
The Zip64 branch of the streaming header reader assumed a data descriptor always follows a >=4GB entry. When the entry instead has back-patched sizes (no descriptor), the following header was parsed as descriptor fields, overwriting the entry's correct size/CRC with central-directory 0xFFFFFFFF sentinels and, on non-seekable async streams, leaving the reader misaligned so the next entry threw.

Now it detects a header signature after the entry data and leaves the already-correct metadata untouched, parsing that header normally. The fix has been applied to both the sync and async readers.
2026-06-29 21:35:55 -05:00
Adam Hathcock
b8a7cc18d9 intermediate commit 2026-06-24 16:27:57 +01:00
Adam Hathcock
760f7685f8 First pass of removing Compressed Tar Archive support. Compressed Tars should be done with TarReader only 2026-06-23 15:42:04 +01:00