102 Commits

Author SHA1 Message Date
Adam Hathcock
82c44cb5a5 remove async dispose 2026-07-31 14:52:58 +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
copilot-swe-agent[bot]
3375aaa90c fix: preserve transformed streams in reader detection 2026-07-24 07:18:02 +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
copilot-swe-agent[bot]
b86a871e22 Fix GZipFactory flat gzip probe disposal regression 2026-07-23 08:02:01 +00:00
Adam Hathcock
e8ee054757 rest of the formats 2026-06-15 17:02:31 +01:00
Adam Hathcock
808524d917 BZip2, GZip and XZ done 2026-06-15 09:59:48 +01:00
copilot-swe-agent[bot]
5adae487c7 Fix writable archive async disposal and add regression tests 2026-05-28 13:12:11 +00:00
Adam Hathcock
63b104f2e7 Merge remote-tracking branch 'origin/master' into adam/write-async
# Conflicts:
#	src/SharpCompress/Compressors/LZMA/Lzma2EncoderStream.cs
#	src/SharpCompress/Factories/TarFactory.cs
#	src/SharpCompress/Polyfills/StreamExtensions.cs
#	src/SharpCompress/Writers/IWriter.cs
2026-05-14 16:12:13 +01:00
Adam Hathcock
9e2aac2521 Merge remote-tracking branch 'origin/release' into adam/write-async 2026-05-14 13:09:34 +01:00
Adam Hathcock
4816f09e6c fmt 2026-05-14 08:48:18 +01:00
Adam Hathcock
b681f96077 windows fix 2026-05-14 08:46:06 +01:00
Adam Hathcock
564f136845 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-14 08:36:23 +01:00
Adam Hathcock
b9ddd4294e Fix GZip write async 2026-05-13 11:33:21 +01:00
Adam Hathcock
ee02924b14 Figure out more async usage for legacy 2026-04-30 15:13:49 +01:00
Adam Hathcock
2f3d11ca61 Rationalize AsyncDisposable 2026-04-30 13:57:03 +01:00
Adam Hathcock
de36344863 Fix more async stream disposal 2026-04-30 13:46:32 +01:00
Adam Hathcock
5d14c96fb0 clean up seekable checks 2026-04-23 10:19:37 +01:00
Adam Hathcock
3ed94dd462 add seekable checks 2026-04-23 09:56:26 +01:00
Adam Hathcock
ba1cd66336 First pass of moving extraction options back 2026-03-02 07:00:33 +00:00
Adam Hathcock
f766213d06 Merge branch 'master' into adam/writers-should-async
# Conflicts:
#	src/SharpCompress/Writers/WriterOptionsExtensions.cs
#	tests/SharpCompress.Test/GZip/GZipWriterAsyncTests.cs
#	tests/SharpCompress.Test/WriterTests.cs
2026-02-22 10:45:17 +00:00
Adam Hathcock
7a9c6b56b7 probably dispose tests 2026-02-13 14:26:54 +00:00
Adam Hathcock
5f3031db4a Open for writing should be async 2026-02-12 11:53:19 +00:00
Adam Hathcock
5a319ffe2c create/open always has to be async for detection 2026-02-12 10:18:43 +00:00
Adam Hathcock
2e364ac0eb cleaned up writing and added more validation and tests 2026-02-10 10:48:42 +00:00
Adam Hathcock
04dd177f19 first pass of removing extraction options (folded into reader options) 2026-02-09 16:52:54 +00:00
Adam Hathcock
cc6e410be8 some options 2026-02-06 15:16:45 +00:00
Adam Hathcock
57c0d00b37 rename Rewindable to SharpCompressStream 2026-02-04 14:12:04 +00:00
Adam Hathcock
ae4ae799b9 merge NonDisposingStream into RewindableStream 2026-02-04 12:40:39 +00:00
Adam Hathcock
46e2ea8507 more async fixes 2026-02-01 09:38:46 +00:00
Adam Hathcock
037b6842bf remove SharpCompressStream 2026-01-31 15:29:34 +00:00
Adam Hathcock
3b83d08e2a fmt 2026-01-22 16:38:44 +00:00
Adam Hathcock
b622a2ce73 fix disposal and other simple issues 2026-01-22 16:38:35 +00:00
Adam Hathcock
b9ed2b09c1 fmt 2026-01-22 09:05:26 +00:00
Adam Hathcock
1a87075f33 GZip fix 2026-01-22 08:13:34 +00:00
Adam Hathcock
8df9232171 use extension where appropriate with more fixes 2026-01-21 16:57:25 +00:00
Adam Hathcock
7b7eba8cd9 more fixes 2026-01-21 16:11:40 +00:00
Adam Hathcock
8abb972f87 Fix test 2026-01-20 11:01:17 +00:00
Adam Hathcock
884f0b702e some grunt rar header async 2026-01-19 16:08:20 +00:00
Adam Hathcock
408d2e6663 Async add entry 2026-01-18 14:57:01 +00:00
copilot-swe-agent[bot]
0de5c59a77 Restore AsyncOnlyStream in archive async tests as requested
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
2026-01-16 09:50:36 +00:00
copilot-swe-agent[bot]
e919930cf6 Fix Archive async tests to not use AsyncOnlyStream (archives need seekable streams)
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
2026-01-16 09:23:32 +00:00
copilot-swe-agent[bot]
2906529080 Fix ReaderFactory.OpenAsyncReader to use async IsArchiveAsync methods
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
2026-01-16 09:12:54 +00:00
Adam Hathcock
ec310c87de merge fixes and fmt 2026-01-15 15:20:52 +00:00
Adam Hathcock
c55a383112 Merge remote-tracking branch 'origin/master' into adam/async-again
# Conflicts:
#	tests/SharpCompress.Test/GZip/GZipReaderAsyncTests.cs
#	tests/SharpCompress.Test/Rar/RarArchiveAsyncTests.cs
#	tests/SharpCompress.Test/SevenZip/SevenZipArchiveAsyncTests.cs
#	tests/SharpCompress.Test/Tar/TarArchiveAsyncTests.cs
#	tests/SharpCompress.Test/Tar/TarReaderAsyncTests.cs
#	tests/SharpCompress.Test/Zip/Zip64AsyncTests.cs
#	tests/SharpCompress.Test/Zip/ZipMemoryArchiveWithCrcAsyncTests.cs
2026-01-15 15:18:05 +00:00
Adam Hathcock
779fba5deb finish the open refactor? 2026-01-15 12:06:54 +00:00
Adam Hathcock
2756b1f6f8 more refactor 2026-01-15 11:55:56 +00:00
Adam Hathcock
7b76858ae1 refactoring naming again 2026-01-15 11:41:30 +00:00
Adam Hathcock
c1d240b516 Fix more tests 2026-01-14 14:06:39 +00:00