111 Commits

Author SHA1 Message Date
Adam Hathcock
b07e6bc727 Validate fragmented GZip trailers asynchronously using inflater read-ahead 2026-10-10 15:40:39 +01:00
Adam Hathcock
b919aaab1f Validate GZip CRC and size during asynchronous stream disposal 2026-10-10 15:40:39 +01:00
Adam Hathcock
953ce61564 Consume both GZip header CRC bytes and reject truncated fields 2026-10-10 15:40:38 +01:00
Adam Hathcock
ab3ac18e98 Fix release review findings in RAR, GZip, and split ZIP parsing 2026-10-10 08:22:55 +01:00
Adam Hathcock
67a22cca97 Fix net48 test build: use plain using for AsyncOnlyStream in gzip reader/archive tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:59:45 +01:00
Adam Hathcock
f07d5e5d75 Merge remote-tracking branch 'origin/release' into rebuild/release-05-gzip-reader-archive 2026-10-09 14:51:14 +01:00
Adam Hathcock
830c816269 Fix net48 test build: use plain using for types without DisposeAsync
AsyncOnlyStream and EntryStream have no DisposeAsync on net48, so
await using fails to compile for that target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:41:59 +01:00
Vadim Syrov
5214c349d1 Fix gzip XLEN overflow in reader and archive APIs 2026-10-09 11:56:36 +01:00
Vadim Syrov
b047d6860a Fix gzip FEXTRA XLEN overflow 2026-10-09 11:56:36 +01:00
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