1651 Commits

Author SHA1 Message Date
Adam Hathcock
5908d9a7e6 move detection and use more sync method 2026-08-06 15:17:32 +01:00
Adam Hathcock
839df5f5d9 moved namespaces 2026-08-06 09:13:22 +01:00
Adam Hathcock
6f497d73bf use sync generator 2026-08-06 08:14:48 +01:00
Adam Hathcock
1ab599a21d Merge remote-tracking branch 'origin/master' into copilot/archiveinformation-show-archive-detail 2026-08-05 16:20:22 +01:00
Adam Hathcock
ea7d97fcee better zip streaming info 2026-08-05 16:20:08 +01:00
Adam Hathcock
f90ce7a511 Merge pull request #1408 from adamhathcock/release
Release to master
2026-08-05 16:18:15 +01:00
Adam Hathcock
b97cce5ef1 review fixes 2026-08-05 15:44:27 +01:00
Adam Hathcock
513b6bec45 fixes SharpCompress TAR extraction overwrites files outside the extraction root when a SymbolicLinkHandler enables symlink chaining 2026-08-05 15:44:27 +01:00
Julian Xhokaxhiu
e4cc79f252 Rar: Fix CPU performance regression 2026-08-04 19:57:30 +02:00
Adam Hathcock
87f5616d1f Detect v Inspect is added. Detect is used only basic info but does not buffer as much as it can. 2026-08-04 11:45:13 +01:00
Adam Hathcock
858f5040df Merge remote-tracking branch 'origin/master' into copilot/archiveinformation-show-archive-detail 2026-08-04 10:29:51 +01:00
Adam Hathcock
46e740b613 Remove UseSyncOverAsyncDispose 2026-08-04 10:16:09 +01:00
Adam Hathcock
c619ec0687 change generated dispose to have a sync only option 2026-08-04 09:49:11 +01:00
Adam Hathcock
89d47e4bc4 Merge remote-tracking branch 'origin/master' 2026-08-04 09:30:51 +01:00
Adam Hathcock
575ef6003a Merge remote-tracking branch 'origin/release' 2026-08-04 09:30:36 +01:00
Adam Hathcock
20ea4a3e03 Do need the csproj change 2026-08-04 09:27:48 +01:00
Adam Hathcock
a5e3f2d17d Merge remote-tracking branch 'origin/adam/large-file-tests' into adam/large-file-tests 2026-08-04 09:12:27 +01:00
Adam Hathcock
693921ec73 fmt 2026-08-04 09:12:00 +01:00
Adam Hathcock
62d1b5dcc8 Provide a better way to manage async disposable streams 2026-08-04 09:11:26 +01:00
copilot-swe-agent[bot]
e578c8a9b8 Fix formatting: correct indentation of helper methods in TarFactory.cs
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
2026-08-04 07:21:40 +00:00
Adam Hathcock
4a71ec898b fixes found by gh and sol 2026-08-03 16:38:27 +01:00
Adam Hathcock
c698124896 Fixes for parallel lzma usage 2026-08-03 15:49:01 +01:00
Adam Hathcock
e8ee2264a9 converted a lot of zip items to sync method generator 2026-08-03 15:18:44 +01:00
Adam Hathcock
67060f8bfd Merge pull request #1399 from julianxhokaxhiu/feat/lzma-modern
Add LZMA Parallelism and Fast Decoder for modern dotnet
2026-08-03 13:28:48 +01:00
Adam Hathcock
ee93b4fa10 Merge remote-tracking branch 'origin/master' into adam/gzip-sync-generator 2026-08-03 12:32:12 +01:00
Adam Hathcock
c4fa31d615 gzip using sync generator 2026-08-03 08:15:18 +01:00
Julian Xhokaxhiu
55db16ecb3 Improve LZMA decoder using 7zip logics for modern dotnet
- Add opt-in Parallel decoding
- Add a new ASM-like decoder
- Add Unit tests for Parallel decoding
2026-08-03 02:50:30 +02:00
Julian Xhokaxhiu
5f340db48d Improve CRC32 by using the slice-by-16 optimization 2026-08-02 23:17:08 +02:00
Adam Hathcock
b91289d82c add large file tests and GZip/Lzw factory fixes 2026-08-01 13:25:08 +01:00
Adam Hathcock
2a2218bcf7 small fix 2026-08-01 12:49:47 +01:00
Adam Hathcock
bc06a9df8b Some clean up 2026-08-01 12:43:44 +01:00
copilot-swe-agent[bot]
cfdfad26b6 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 12:19:09 +01:00
Adam Hathcock
a8f6f18843 Fix SeekableSharpCompressStream.StopRecording() to rewind to recorded position
When SeekableSharpCompressStream.StopRecording() was called (e.g. after the tar
probe in GZipFactory.TryOpenReader), it cleared _recordedPosition without seeking
back to it. This left the underlying FileStream at the advanced position reached
during the probe, so the subsequent GZipReader would start reading from the
wrong offset, producing Key=null and 0 extracted bytes.

Fix: seek back to _recordedPosition before clearing it, matching the behavior of
the non-seekable SharpCompressStream.StopRecording() which rewinds _logicalPosition.

Also enhance the existing GZip_ReaderFactory_FlatGZip test to actually verify the
extracted content (not just MoveToNextEntry returns true), and add an async variant.

Closes #1391
2026-07-31 14:21:24 +01: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
copilot-swe-agent[bot]
a688c7c657 Fix BufferedSubStream ReadAsync cancellation fast-path 2026-07-29 07:55:48 +00:00
Julian Xhokaxhiu
f5289ef49e Improve LZMA decoding for Solid Archives 2026-07-29 02:36:25 +02:00
copilot-swe-agent[bot]
d301cb365f Add format-specific ArchiveInformation details 2026-07-28 16:45:31 +00: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
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
9e3a92ac10 Fix restore 2026-07-28 13:13:17 +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
ea44ec098b first pass of sync generator 2026-07-28 11:26:51 +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