Commit Graph

3122 Commits

Author SHA1 Message Date
Adam Hathcock
1fc761d5a5 Update dependencies and migrate tests to Microsoft Testing Platform 2026-10-24 12:33:38 +01:00
dependabot[bot]
3a964e3816 Bump the all-dependencies group with 5 updates
Bumps JetBrains.Profiler.SelfApi from 2.5.18 to 2.5.19
Bumps Microsoft.NET.Test.Sdk from 18.10.1 to 18.11.0
Bumps Microsoft.SourceLink.GitHub from 10.0.401 to 10.0.402
Bumps Pure.DI from 2.5.4 to 2.5.5
Bumps System.Text.Encoding.CodePages from 10.0.12 to 10.0.13

---
updated-dependencies:
- dependency-name: JetBrains.Profiler.SelfApi
  dependency-version: 2.5.19
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-dependencies
- dependency-name: Microsoft.SourceLink.GitHub
  dependency-version: 10.0.402
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: Pure.DI
  dependency-version: 2.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: System.Text.Encoding.CodePages
  dependency-version: 10.0.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-22 09:40:12 +00:00
Adam Hathcock
cbbf5e8f55 Merge pull request #1466 from adamhathcock/adam/pure-di-2
Refactor archive workflows into focused services and public entry points
2026-10-22 08:23:09 +01:00
Adam Hathcock
b8e81bd3f5 Split ArchiveFactory into focused public entry points 2026-10-21 11:47:47 +01:00
Adam Hathcock
ed29acda67 Remove redundant partial modifiers 2026-10-21 09:53:07 +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
50b7f49054 Merge pull request #1453 from adamhathcock/feature/non-seekable-zip64-writing
Support ZIP64 writing to non-seekable streams
2026-10-20 12:06: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
0e0dc2a795 Merge pull request #1465 from adamhathcock/adam/release-to-master
Release to master
2026-10-20 11:36:44 +01:00
Adam Hathcock
2d9508755e Merge remote-tracking branch 'origin/master' into adam/release-to-master 2026-10-20 11:21:00 +01:00
Adam Hathcock
799f1e6239 Merge pull request #1462 from adamhathcock/perf/rar-profile-pooling
Rar profile pooling
2026-10-20 11:20:08 +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
b4af8afe66 Merge pull request #1464 from adamhathcock/fix/rar5-hmac-allocations
Reduce allocations in RAR5 password key derivation
0.50.7
2026-10-20 10:59:07 +01:00
Adam Hathcock
79137bd621 Merge pull request #1463 from adamhathcock/perf/7zip-profile-pooling
7zip profile pooling
2026-10-20 10:58:28 +01:00
Adam Hathcock
3f6ba78e22 Document ring-buffer allocation profiling results 2026-10-20 10:57:04 +01:00
Adam Hathcock
c78cc86e04 Avoid temporary allocations in ring-buffered async reads 2026-10-20 10:52:15 +01:00
Adam Hathcock
f63cd81a65 Reduce allocations in encrypted RAR reading
Reuse bounded buffers and transform AES blocks in place. Remove per-block arrays and plaintext queues, avoid per-byte header allocations, and dispose owned crypto transforms.

Add encrypted RAR benchmarks, regression tests, and before/after profiling results. Full .NET 10 suite passes (2,446 tests); all library targets build and net48 tests compile.
2026-10-20 10:43:28 +01:00
Adam Hathcock
e61a335d54 Reduce allocations in RAR5 password key derivation
Reuse keyed HMAC state and digest buffers on modern .NET targets while preserving RAR5's three PBKDF2 snapshots. Add independent derivation checks and an allocation regression test.

Profiling on macOS ARM64 with .NET 10 reduced allocations by 99.96%, but showed slower throughput; Alpine-specific timing remains unverified. Full .NET 10 test suite passes.
2026-10-20 10:10:29 +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
23ac770e6a Merge remote-tracking branch 'origin/master' into perf/rar-profile-pooling 2026-10-20 08:45:43 +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
1ad052edcc Merge remote-tracking branch 'origin/master' into perf/7zip-profile-pooling
# Conflicts:
#	src/SharpCompress/Compressors/LZMA/Lzma2EncoderStream.cs
#	src/SharpCompress/Compressors/LZMA/LzmaStream.Async.cs
#	src/SharpCompress/IO/ReadOnlyMemoryStream.cs
2026-10-20 08:31:32 +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
7ddb01214a Merge pull request #1459 from adamhathcock/adam/release-to-master
Release fixes to master
2026-10-19 12:58:29 +01:00
Adam Hathcock
78006f94f7 More pooled or readonly memory stream usage 2026-10-19 12:07:29 +01:00
Adam Hathcock
1414e17f6f Avoid copying pooled 7z headers when computing async CRCs 2026-10-19 12:01:46 +01:00
Adam Hathcock
700ae66e0a Fix usage of DisposeAsyncScope 2026-10-19 11:49:08 +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
542ed974d4 Merge pull request #1458 from adamhathcock/adam/release-fixes
fixes for release
0.50.6
2026-10-19 11:05:44 +01:00
Adam Hathcock
2168385f2e fixes for release 2026-10-19 10:52:07 +01:00
Adam Hathcock
560a148ddb Merge pull request #1455 from romaklayt/perf/source-stream-cache-length
Read each SourceStream part's length once
2026-10-19 10:36:22 +01:00
Adam Hathcock
999676d9c9 Merge pull request #1457 from romaklayt/perf/zip-winzip-aes-reader
Speed up reading WinZip AES zip entries
2026-10-19 10:34:55 +01:00
Adam Hathcock
2fe5f3a4e8 Merge commit from fork
Reject truncated LZMA2 headers and prevent stalled decoding
2026-10-19 10:27:41 +01:00
Adam Hathcock
7642f76f38 changes fixes to use pooled arrays 2026-10-19 10:10: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
08f54e6245 Merge pull request #1454 from adamhathcock/feature/reduce-archive-allocations
Reduce archive allocations across types
2026-10-19 09:51:51 +01:00
Adam Hathcock
c6d8c76b14 Review changes around disposal 2026-10-19 09:43:44 +01:00
Adam Hathcock
26d482f785 Merge remote-tracking branch 'origin/master' into feature/reduce-archive-allocations 2026-10-19 09:13:03 +01:00
Adam Hathcock
431ff80adc Merge pull request #1456 from adamhathcock/fix/lzma-codefast-bounds-checks 2026-10-16 20:47:34 +01:00
Adam Hathcock
1fc4a7cdf1 Remove unsupported LZMA terminal-error guarantees 2026-10-16 16:03:00 +01:00
Adam Hathcock
a83022ca17 Preserve frozen stream recordings during TAR probing 2026-10-16 15:57:21 +01:00