Commit Graph

98 Commits

Author SHA1 Message Date
Adam Hathcock
366fa4ab34 Restart solid 7z decoders after failures and read mode changes 2026-10-22 09:11:14 +01:00
Adam Hathcock
2c29a6bfab Fix solid 7z cache positioning after partial entry reads 2026-10-22 08:22:48 +01:00
Adam Hathcock
b8e81bd3f5 Split ArchiveFactory into focused public entry points 2026-10-21 11:47:47 +01:00
Adam Hathcock
068da202e4 Expose default services directly through LibraryDefaults 2026-10-21 09:46:38 +01:00
Adam Hathcock
e21da75de2 Split DI services into focused workflow components 2026-10-21 09:27:47 +01:00
Adam Hathcock
4cc8d6b257 Use generated internal interfaces for DI services 2026-10-21 09:12:42 +01:00
Adam Hathcock
b578325982 Move extension workflows into internal services 2026-10-21 08:57:36 +01:00
Adam Hathcock
740ae8fa89 Refactor factory workflows into internal Pure.DI services 2026-10-21 08:42:00 +01:00
Adam Hathcock
2463488de7 Merge remote-tracking branch 'origin/master' into feature/non-seekable-zip64-writing
# Conflicts:
#	src/SharpCompress/Factories/TarFactory.cs
#	src/SharpCompress/Readers/Tar/TarReader.Factory.cs
#	src/SharpCompress/Readers/Tar/TarReader.cs
#	tests/SharpCompress.Test/Streams/RarLifetimeTests.cs
#	tests/SharpCompress.Test/Streams/SevenZipLifetimeTests.cs
#	tests/SharpCompress.Test/Streams/TarLifetimeTests.cs
2026-10-20 11:41:45 +01:00
Adam Hathcock
714a27fd40 Fix RAR checksum handling for empty reads and checksum-free entries 2026-10-20 11:11:43 +01:00
Adam Hathcock
5efd391725 Merge remote-tracking branch 'origin/master' into perf/rar-profile-pooling 2026-10-20 11:07:23 +01:00
Adam Hathcock
bae154799d Merge pull request #1461 from adamhathcock/perf/zip-profile-pooling
Reduce Deflate read and Huffman scratch allocations
2026-10-20 11:05:49 +01:00
Adam Hathcock
3f6ba78e22 Document ring-buffer allocation profiling results 2026-10-20 10:57:04 +01:00
Adam Hathcock
7731843e25 Reduce Deflate read and Huffman scratch allocations
Use a ValueTask read core and memory-based compressed-input refills on modern targets, replace per-block Huffman output arrays with scalar parameters, and decode directly into array-backed caller memory with a pooled fallback.

Preserve generated sync array-read semantics and clear codec output references after reads. Add slice, fallback, cancellation, failure, tree-validation, and read-ahead coverage; document staged ZIP profiles.

Validation: 2,989 .NET 10 tests passed; all library targets, net48 tests, and performance project compile; formatting checks pass.
2026-10-20 09:56:54 +01:00
Adam Hathcock
76481ac615 Summarize the latest merged 7z profiling results
Replace historical profiling rounds with a self-contained report for the origin/master merge comparison, including allocation results, timing variability, validation, and reproduction artifacts.
2026-10-20 08:44:24 +01:00
Adam Hathcock
f41cc208cc Pool LZMA workspaces and streamline 7z metadata writing
Reuse LZMA2 trial decoders and pooled compressed output, pool and consolidate decoder probability banks, lazily rent encoder optimization scratch, and avoid copying direct async memory writes.

Use bounded stack scratch and stream 7z metadata without temporary property buffers. Add ownership, failure, context-shrink, Unicode, and block-boundary regressions.

Document allocation profiles, the small-file LZMA2 throughput tradeoff, and rejection of exact-size match-finder arrays. Validation: 3,016 .NET 10 tests passed; all library targets, net48 tests, and performance project compile; formatting checks pass.
2026-10-20 08:28:23 +01:00
Adam Hathcock
030569611e Reduce 7z copy and LZMA decoder allocations
Pool writer CRC-copy buffers, use memory-based async read overloads on modern targets, reuse LZMA2 decoders across resets, and initialize probability-model banks lazily.

Add reset/property-change, memory-read, writer boundary/CRC, and growth regression coverage. Document staged profiling results and rejection of dictionary-growth policies that regress small-file allocations.

Validation: 2,997 .NET 10 Release tests passed, all library targets built, net48 tests compiled, and formatting checks passed.
2026-10-19 15:11:47 +01:00
Adam Hathcock
14d77b671c Release pooled 7z decoder buffers across async and partial reads
Dispose cached folder decoders during async archive cleanup and scope temporary encoded-header decoders in both read paths. Release LZMA range-decoder input buffers on partial reads and failures while preserving borrowed source ownership.

Correct the synchronous extraction-reader benchmark and expand lifetime and checksum coverage. Document profiling showing async Archive allocations falling from 8.95 MiB to 0.70 MiB per extraction, with metadata-only allocations reduced by 70%.

Validation: 2,989 .NET 10 Release tests passed; all library targets, the performance project, and net48 test compilation succeeded. Formatting and whitespace checks passed.
2026-10-19 14:43:51 +01:00
Adam Hathcock
81879e9de4 Pool RAR Huffman scratch buffers and validate async checksums
Reuse unpacker-owned pooled scratch arrays for async RAR5 and RAR2 Huffman tables, preserving alphabet bounds and zeroed history tails. Match async Archive CRC32/BLAKE2sp verification to the synchronous path and dispose entry streams when initialization fails.

Add regression tests and profiling documentation showing approximately 3.13 MiB fewer managed allocations per 200 MiB extraction. Keep this change based directly on master without unrelated branch commits.

Validation: 2,983 .NET 10 Release tests passed, all six library targets built, net48 tests compiled, and formatting checks passed.
2026-10-19 14:10:30 +01:00
Adam Hathcock
0fbf36d602 Merge remote-tracking branch 'origin/release'
# Conflicts:
#	src/SharpCompress/Compressors/LZMA/LZ/LzOutWindow.cs
#	src/SharpCompress/Compressors/LZMA/LzmaStream.cs
2026-10-19 11:15:09 +01:00
Adam Hathcock
4966fc186b Merge branch 'release' into fix/lzma2-truncated-header
# Conflicts:
#	src/SharpCompress/Compressors/LZMA/LZ/LzOutWindow.cs
2026-10-19 09:59:33 +01:00
Adam Hathcock
2369f10b63 Grow LZMA dictionary storage only as decoded history requires 2026-10-16 15:39:56 +01:00
Adam Hathcock
8a9b76dd44 Grow Shrink output from decoded bytes and stop at input EOF 2026-10-16 15:35:27 +01:00
Adam Hathcock
0860da8bc5 Buffer ARC LZW input incrementally and reject truncated entries 2026-10-16 15:34:07 +01:00
Adam Hathcock
9b0be6f984 Skip ZIP64 extensible data without size-driven allocations 2026-10-16 15:33:10 +01:00
Adam Hathcock
cae625fc05 Support ZIP64 writing to non-seekable streams 2026-10-15 18:17:39 +01:00
Adam Hathcock
e58fcb23e5 Preserve async disposal across all supported frameworks 2026-10-13 12:57:14 +01:00
Adam Hathcock
d431c80b38 Fix WinZip AES authentication retry after cancellation 2026-10-13 12:23:24 +01:00
Adam Hathcock
a47e02e4cd Merge branch 'master' into adam/release-dependencies-and-async-stream-fixes 2026-10-13 11:40:46 +01:00
Adam Hathcock
1fb8ac1724 Merge remote-tracking branch 'origin/release'
# Conflicts:
#	src/SharpCompress/Compressors/LZMA/LzmaStream.Async.cs
#	src/SharpCompress/Compressors/LZMA/LzmaStream.cs
2026-10-13 11:39:15 +01:00
Adam Hathcock
1080969e51 Fix async writable entry streams and cross-framework disposal 2026-10-13 11:36:07 +01:00
Adam Hathcock
ba8d0f84b1 Merge remote-tracking branch 'origin/release'
# Conflicts:
#	src/SharpCompress/Common/GZip/GZipChecksumValidationStream.cs
#	src/SharpCompress/Common/Zip/WinzipAesCryptoStream.Async.cs
#	src/SharpCompress/Common/Zip/WinzipAesCryptoStream.cs
#	src/SharpCompress/Compressors/Deflate/ZlibBaseStream.cs
2026-10-13 11:00:17 +01:00
Adam Hathcock
bdb42df4dc Make raw LZMA setup and disposal exception-safe 2026-10-13 10:29:07 +01:00
Adam Hathcock
38e3222dc2 Release rewind buffers despite disposal failures and reject disposed reads 2026-10-13 10:26:09 +01:00
Adam Hathcock
c574364838 Fix pooled buffer ownership and exception-safe cleanup 2026-10-13 09:57:19 +01:00
Adam Hathcock
dcd2515598 Merge remote-tracking branch 'origin/release' into fix/1439-sevenzip-password-exceptions
# Conflicts:
#	docs/API.md
2026-10-12 17:10:32 +01:00
Adam Hathcock
a147a7bc29 Merge pull request #1442 from adamhathcock/fix/release-pr-1436-followups
pr 1436 followups
2026-10-12 17:05:28 +01:00
Adam Hathcock
69e1477ee6 Expose public exceptions for encrypted 7z decoding failures 2026-10-12 15:29:40 +01:00
Adam Hathcock
7d7983e0f4 Fix 7z encryption detection for streamless files 2026-10-12 15:29:40 +01:00
Adam Hathcock
06fea02e64 Resolve RAR companion volumes with unambiguous case-insensitive fallback 2026-10-10 15:40:36 +01:00
Adam Hathcock
7265047dd7 Verify WinZip AES authentication and reject truncated encrypted data 2026-10-10 15:40:34 +01:00
Adam Hathcock
9ba6d17b5d Validate 7z AES KDF limits before unsalted key derivation 2026-10-10 15:40:33 +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
eab8154e3f Merge pull request #1436 from adamhathcock/release
Release to master
2026-10-09 15:24:05 +01:00
Adam Hathcock
915183320c added some review fixes 2026-10-05 10:48:34 +01:00
Adam Hathcock
b67a8a4ead Fix encrypted RAR5 archive comments 2026-10-02 13:33:55 +01:00
Iain
be0ed362d2 Fix the exception catches and ArchiveType.BZip2 in the API quick reference 2026-09-22 01:40:55 +01:00
Adam Hathcock
839df5f5d9 moved namespaces 2026-08-06 09:13:22 +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