[PR #529] [MERGED] Improve code quality v2 #1078

Closed
opened 2026-01-29 22:18:54 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/529
Author: @iamcarbon
Created: 7/31/2020
Status: Merged
Merged: 7/31/2020
Merged by: @adamhathcock

Base: masterHead: master


📝 Commits (7)

  • 6bdf236 Inline variable declarations
  • 4db6155 Refactor ExtraData and enable nullable
  • 773158e Seal LZipStream
  • 7750ed7 Finish spanification of RijndaelEngine
  • 6973436 Add and use Stream.Write(ReadOnlySpan buffer) polyfill
  • 4357165 Add Read/Write overrides to NonDisposingStream
  • ee3162a Fix return

📊 Changes

12 files changed (+154 additions, -114 deletions)

View changed files

📝 src/SharpCompress/Archives/GZip/GZipArchive.cs (+3 -4)
📝 src/SharpCompress/Common/SevenZip/ArchiveReader.cs (+8 -17)
📝 src/SharpCompress/Common/Zip/Headers/LocalEntryHeaderExtraFactory.cs (+24 -35)
📝 src/SharpCompress/Compressors/BZip2/BZip2Stream.cs (+17 -2)
📝 src/SharpCompress/Compressors/Deflate/ZlibBaseStream.cs (+4 -4)
📝 src/SharpCompress/Compressors/LZMA/LZipStream.cs (+18 -1)
📝 src/SharpCompress/Crypto/Crc32Stream.cs (+15 -5)
📝 src/SharpCompress/Crypto/RijndaelEngine.cs (+17 -35)
📝 src/SharpCompress/IO/NonDisposingStream.cs (+14 -0)
src/SharpCompress/Polyfills/StreamExtensions.cs (+25 -0)
📝 src/SharpCompress/Utility.cs (+2 -4)
📝 src/SharpCompress/Writers/Zip/ZipWriter.cs (+7 -7)

📄 Description

This PR polyfills Stream.Write(ReadOnlySpan buffer) on .NET framework and eliminates a few allocations.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/529 **Author:** [@iamcarbon](https://github.com/iamcarbon) **Created:** 7/31/2020 **Status:** ✅ Merged **Merged:** 7/31/2020 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (7) - [`6bdf236`](https://github.com/adamhathcock/sharpcompress/commit/6bdf2365fc87dab1a44abafbd3680fb9f1df16e9) Inline variable declarations - [`4db6155`](https://github.com/adamhathcock/sharpcompress/commit/4db615597db7532b6d308a57e96c6776f17034e0) Refactor ExtraData and enable nullable - [`773158e`](https://github.com/adamhathcock/sharpcompress/commit/773158e9d835c9ae7951760e2fbae9192bcaa623) Seal LZipStream - [`7750ed7`](https://github.com/adamhathcock/sharpcompress/commit/7750ed71063183bedd70c1360b139d6b15be955c) Finish spanification of RijndaelEngine - [`6973436`](https://github.com/adamhathcock/sharpcompress/commit/6973436b9459a048ff3014d48c0f3431db1245bb) Add and use Stream.Write(ReadOnlySpan<byte> buffer) polyfill - [`4357165`](https://github.com/adamhathcock/sharpcompress/commit/435716516374828c94400d2647e655c30c38796a) Add Read/Write overrides to NonDisposingStream - [`ee3162a`](https://github.com/adamhathcock/sharpcompress/commit/ee3162ad71b9609e47a28e4dc1da3c511c01c7be) Fix return ### 📊 Changes **12 files changed** (+154 additions, -114 deletions) <details> <summary>View changed files</summary> 📝 `src/SharpCompress/Archives/GZip/GZipArchive.cs` (+3 -4) 📝 `src/SharpCompress/Common/SevenZip/ArchiveReader.cs` (+8 -17) 📝 `src/SharpCompress/Common/Zip/Headers/LocalEntryHeaderExtraFactory.cs` (+24 -35) 📝 `src/SharpCompress/Compressors/BZip2/BZip2Stream.cs` (+17 -2) 📝 `src/SharpCompress/Compressors/Deflate/ZlibBaseStream.cs` (+4 -4) 📝 `src/SharpCompress/Compressors/LZMA/LZipStream.cs` (+18 -1) 📝 `src/SharpCompress/Crypto/Crc32Stream.cs` (+15 -5) 📝 `src/SharpCompress/Crypto/RijndaelEngine.cs` (+17 -35) 📝 `src/SharpCompress/IO/NonDisposingStream.cs` (+14 -0) ➕ `src/SharpCompress/Polyfills/StreamExtensions.cs` (+25 -0) 📝 `src/SharpCompress/Utility.cs` (+2 -4) 📝 `src/SharpCompress/Writers/Zip/ZipWriter.cs` (+7 -7) </details> ### 📄 Description This PR polyfills Stream.Write(ReadOnlySpan<byte> buffer) on .NET framework and eliminates a few allocations. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:18:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1078