[PR #496] [MERGED] Reduce the amount of allocations #1059

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

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/496
Author: @Bond-009
Created: 12/30/2019
Status: Merged
Merged: 1/3/2020
Merged by: @adamhathcock

Base: masterHead: allocations


📝 Commits (5)

  • 80b0671 Reduce the amount of allocations
  • 1ed675e Minor improvement
  • 50d4b39 Fix test
  • d2c2b58 Fix language version and add netstandard2.1
  • 6dfe0c7 Merge branch 'master' into allocations

📊 Changes

34 files changed (+332 additions, -1666 deletions)

View changed files

📝 src/SharpCompress/Common/ArchiveEncoding.cs (+1 -1)
📝 src/SharpCompress/Common/GZip/GZipFilePart.cs (+4 -5)
📝 src/SharpCompress/Common/Rar/RarCryptoWrapper.cs (+2 -2)
📝 src/SharpCompress/Common/Rar/RarRijndael.cs (+5 -5)
📝 src/SharpCompress/Common/SevenZip/ArchiveDatabase.cs (+7 -6)
📝 src/SharpCompress/Common/SevenZip/ArchiveReader.cs (+10 -8)
📝 src/SharpCompress/Common/Tar/Headers/TarHeader.cs (+10 -14)
📝 src/SharpCompress/Common/Zip/Headers/LocalEntryHeaderExtraFactory.cs (+19 -19)
📝 src/SharpCompress/Common/Zip/Headers/ZipFileEntry.cs (+5 -6)
📝 src/SharpCompress/Common/Zip/WinzipAesCryptoStream.cs (+2 -2)
📝 src/SharpCompress/Common/Zip/WinzipAesEncryptionData.cs (+3 -3)
📝 src/SharpCompress/Common/Zip/ZipFilePart.cs (+6 -6)
📝 src/SharpCompress/Compressors/ADC/ADCBase.cs (+13 -15)
📝 src/SharpCompress/Compressors/Deflate/GZipStream.cs (+3 -4)
📝 src/SharpCompress/Compressors/Deflate/ZlibBaseStream.cs (+10 -9)
📝 src/SharpCompress/Compressors/LZMA/LZipStream.cs (+10 -9)
📝 src/SharpCompress/Compressors/LZMA/LzmaEncoder.cs (+10 -5)
📝 src/SharpCompress/Compressors/LZMA/LzmaStream.cs (+6 -6)
📝 src/SharpCompress/Compressors/PPMd/H/FreqData.cs (+10 -8)
📝 src/SharpCompress/Compressors/PPMd/H/PPMContext.cs (+7 -7)

...and 14 more files

📄 Description

  • Directly fill an array instead of filling a List and copying that to
    an array
  • Use own buffer when writing bytes to a stream
  • Remove DataConverter class, replaced by BinaryPrimitives

🔄 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/496 **Author:** [@Bond-009](https://github.com/Bond-009) **Created:** 12/30/2019 **Status:** ✅ Merged **Merged:** 1/3/2020 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `allocations` --- ### 📝 Commits (5) - [`80b0671`](https://github.com/adamhathcock/sharpcompress/commit/80b06718441560d4f7a3982756fa70236e6dab2e) Reduce the amount of allocations - [`1ed675e`](https://github.com/adamhathcock/sharpcompress/commit/1ed675e9600e0bd7bc653d3a6606ef67c6fab664) Minor improvement - [`50d4b39`](https://github.com/adamhathcock/sharpcompress/commit/50d4b39ca0231d2176c31620a9aad36a541a332a) Fix test - [`d2c2b58`](https://github.com/adamhathcock/sharpcompress/commit/d2c2b58f3bd2c82d292b4b9bb39fefe1cbca07f0) Fix language version and add netstandard2.1 - [`6dfe0c7`](https://github.com/adamhathcock/sharpcompress/commit/6dfe0c7a96d4abb35a19769b5a31025f32532b90) Merge branch 'master' into allocations ### 📊 Changes **34 files changed** (+332 additions, -1666 deletions) <details> <summary>View changed files</summary> 📝 `src/SharpCompress/Common/ArchiveEncoding.cs` (+1 -1) 📝 `src/SharpCompress/Common/GZip/GZipFilePart.cs` (+4 -5) 📝 `src/SharpCompress/Common/Rar/RarCryptoWrapper.cs` (+2 -2) 📝 `src/SharpCompress/Common/Rar/RarRijndael.cs` (+5 -5) 📝 `src/SharpCompress/Common/SevenZip/ArchiveDatabase.cs` (+7 -6) 📝 `src/SharpCompress/Common/SevenZip/ArchiveReader.cs` (+10 -8) 📝 `src/SharpCompress/Common/Tar/Headers/TarHeader.cs` (+10 -14) 📝 `src/SharpCompress/Common/Zip/Headers/LocalEntryHeaderExtraFactory.cs` (+19 -19) 📝 `src/SharpCompress/Common/Zip/Headers/ZipFileEntry.cs` (+5 -6) 📝 `src/SharpCompress/Common/Zip/WinzipAesCryptoStream.cs` (+2 -2) 📝 `src/SharpCompress/Common/Zip/WinzipAesEncryptionData.cs` (+3 -3) 📝 `src/SharpCompress/Common/Zip/ZipFilePart.cs` (+6 -6) 📝 `src/SharpCompress/Compressors/ADC/ADCBase.cs` (+13 -15) 📝 `src/SharpCompress/Compressors/Deflate/GZipStream.cs` (+3 -4) 📝 `src/SharpCompress/Compressors/Deflate/ZlibBaseStream.cs` (+10 -9) 📝 `src/SharpCompress/Compressors/LZMA/LZipStream.cs` (+10 -9) 📝 `src/SharpCompress/Compressors/LZMA/LzmaEncoder.cs` (+10 -5) 📝 `src/SharpCompress/Compressors/LZMA/LzmaStream.cs` (+6 -6) 📝 `src/SharpCompress/Compressors/PPMd/H/FreqData.cs` (+10 -8) 📝 `src/SharpCompress/Compressors/PPMd/H/PPMContext.cs` (+7 -7) _...and 14 more files_ </details> ### 📄 Description * Directly fill an array instead of filling a List and copying that to an array * Use own buffer when writing bytes to a stream * Remove DataConverter class, replaced by BinaryPrimitives --- <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:50 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1059