248 Commits

Author SHA1 Message Date
Adam Hathcock
2866bfbd54 First pass with zip 2026-06-15 09:17:05 +01:00
Adam Hathcock
de6e2bfee2 Add WriterOptions.BufferSize property 2026-06-12 14:41:05 +01:00
Adam Hathcock
3a73cfe925 Add instance based extraction size instead of just static 2026-06-11 17:24:42 +01:00
Adam Hathcock
67ceab7443 reduce Rar allocations by stackalloc and pooling 2026-05-28 07:04:28 +01:00
copilot-swe-agent[bot]
63bfa185f7 fix public init-only API setters
Agent-Logs-Url: https://github.com/adamhathcock/sharpcompress/sessions/9d9bc63c-5667-44ae-82f2-bd83df142606

Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
2026-05-20 08:14:24 +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
da20f512aa use ValueTask where possible 2026-05-14 15:10:04 +01:00
Adam Hathcock
117eaa8167 Merge remote-tracking branch 'origin/master' into adam/merge-release-to-master
# Conflicts:
#	src/SharpCompress/Common/ExtractionMethods.Async.cs
#	src/SharpCompress/Common/ExtractionMethods.cs
2026-05-06 10:11:30 +01:00
Adam Hathcock
7de1f07597 revert change that made no sense 2026-05-05 17:58:36 +01:00
Adam Hathcock
2c35d2d242 made methods extension methods for IEntry 2026-05-05 17:30:02 +01:00
Adam Hathcock
2bae46e28a add extension methods for checks 2026-04-23 10:11:54 +01:00
Adam Hathcock
6a402a3b50 use with methods 2026-04-21 11:04:14 +01:00
Adam Hathcock
4f1f32b508 Fix usages of ReaderOptions 2026-04-21 10:55:59 +01:00
Adam Hathcock
3af023a4a8 Use explicit helpers for leaving streams open or not. 2026-04-21 10:43:43 +01:00
Adam Hathcock
72b81b8609 Merge pull request #1293 from puk06/fix/leave-stream-open-default
fix: Change LeaveStreamOpen default from true to false
2026-04-21 10:37:59 +01:00
ぷこるふ
a351b56737 Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-04-21 10:26:31 +09:00
ぷこるふ
8d193db721 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-04-21 09:32:27 +09:00
Puk06
37c0f5aec5 fix: Change LeaveStreamOpen default from true to false
As of v0.21, the library is documented to close wrapped streams by default.
However, the ReaderOptions.LeaveStreamOpen property defaulted to true, which
contradicted the documented behavior and caused file locks when deleting
archives after extraction.

Changes:
- Set LeaveStreamOpen = false as the default (consistent with v0.21 design)
- Updated ReaderOptions.cs with comprehensive documentation explaining:
  * File-based vs caller-provided stream handling
  * When to use LeaveStreamOpen = true
  * Usage examples for both scenarios
- Updated AGENTS.md Stream Handling Rules section with:
  * Clear explanation of default disposal behavior
  * Overload differences (file-based vs stream-based)
  * Guidance on using ForExternalStream preset

This ensures the implementation matches the documented behavior and prevents
unexpected file locking issues during archive deletion.

Fixes: File deletion failures after archive extraction
2026-04-20 22:32:36 +09:00
Adam Hathcock
b326b719bc Merge branch 'release' into adam/master-release
# Conflicts:
#	src/SharpCompress/packages.lock.json
2026-04-04 10:50:12 +01:00
copilot-swe-agent[bot]
669fbed62b Dynamic ring buffer sizing for BZip2 and ZStandard on non-seekable streams
Agent-Logs-Url: https://github.com/adamhathcock/sharpcompress/sessions/b115976a-5d8a-412e-a462-72b4531f2d0a

Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
2026-04-02 10:56:50 +00:00
Adam Hathcock
fefeed0601 Merge pull request #1267 from adamhathcock/release
Release to master
2026-03-28 09:53:45 +00:00
copilot-swe-agent[bot]
d56b676ee9 fix: increase RewindableBufferSize to 160KB to cover ZStandard worst-case first block
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
2026-03-17 12:25:29 +00:00
Adam Hathcock
f34ed8bd94 first commit for conslidating publci api 2026-03-06 11:22:09 +00:00
Adam Hathcock
3fb7e02653 update docs 2026-03-03 12:50:27 +00:00
Adam Hathcock
0910f20c90 renamed to ReaderOptions.ForFilePath 2026-03-03 12:40:58 +00:00
Adam Hathcock
ba1cd66336 First pass of moving extraction options back 2026-03-02 07:00:33 +00:00
Adam Hathcock
0d913f6bbc some code fixes 2026-02-22 13:19:04 +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
855d4b4ce2 Use more SC exceptions instead of generic ones 2026-02-16 12:40:07 +00:00
Adam Hathcock
eca7bcb515 more clean up 2026-02-16 10:58:01 +00:00
Adam Hathcock
eb5c5faa99 some nullability fixes 2026-02-13 14:43:56 +00:00
Adam Hathcock
39c9d68c4f Better usage of reader options 2026-02-13 11:00:53 +00:00
Adam Hathcock
da5cc69a06 fix up gzip encoding 2026-02-13 09:51:46 +00:00
Adam Hathcock
d667288a87 added async stream creation 2026-02-12 16:49:56 +00:00
Adam Hathcock
a92f82ef28 complete the usage of providers for detection and async 2026-02-12 15:09:21 +00:00
Adam Hathcock
0c21681717 change namespace 2026-02-12 14:26:03 +00:00
Adam Hathcock
0e2c33dd78 Merge branch 'master' into adam/add-alternate-compressions
# Conflicts:
#	tests/SharpCompress.Performance/Benchmarks/TarBenchmarks.cs
#	tests/SharpCompress.Performance/Benchmarks/ZipBenchmarks.cs
#	tests/SharpCompress.Performance/baseline-results.md
2026-02-12 14:20:01 +00:00
Adam Hathcock
2dfe535e0b add async read and write for files 2026-02-12 12:10:43 +00:00
Adam Hathcock
7f6272807d update docs 2026-02-12 10:32:20 +00:00
Adam Hathcock
89d948b4e1 use configure await false 2026-02-12 10:29:15 +00:00
Adam Hathcock
5a319ffe2c create/open always has to be async for detection 2026-02-12 10:18:43 +00:00
Adam Hathcock
bae660381c TarArchive should use a compression method like TarReader 2026-02-12 09:48:06 +00:00
Adam Hathcock
b2f1d007c6 Clean up some code paths 2026-02-12 08:50:18 +00:00
Adam Hathcock
6b035cb76e updates 2026-02-10 15:51:50 +00:00
Adam Hathcock
a3e3d9d0aa some clean up 2026-02-10 15:43:32 +00:00
Adam Hathcock
f0da1b3a93 Consolidate 2026-02-10 15:32:23 +00:00
Adam Hathcock
04c3b84fc0 merge fixes 2026-02-10 15:22:55 +00:00
Adam Hathcock
a9f2d3cf7f Merge remote-tracking branch 'origin/master' into adam/add-alternate-compressions
# Conflicts:
#	src/SharpCompress/Archives/GZip/GZipArchive.Async.cs
#	src/SharpCompress/Archives/GZip/GZipArchive.cs
#	src/SharpCompress/Archives/Zip/ZipArchive.Async.cs
#	src/SharpCompress/Archives/Zip/ZipArchive.cs
#	src/SharpCompress/Common/GZip/GZipEntry.Async.cs
#	src/SharpCompress/Common/GZip/GZipEntry.cs
#	src/SharpCompress/Common/Options/IReaderOptions.cs
#	src/SharpCompress/Readers/ReaderOptions.cs
#	src/SharpCompress/Readers/Zip/ZipReader.Async.cs
#	src/SharpCompress/Readers/Zip/ZipReader.cs
#	src/SharpCompress/Writers/GZip/GZipWriterOptions.cs
2026-02-10 15:21:13 +00:00
Adam Hathcock
4639748461 Merge remote-tracking branch 'origin/master' into adam/add-configure-await
# Conflicts:
#	src/SharpCompress/Archives/ArchiveFactory.Async.cs
2026-02-10 13:55:34 +00:00
Adam Hathcock
8b375b9179 remove some dangling completed tasks 2026-02-10 13:28:48 +00:00