[PR #878] [MERGED] Fix XZBlock padding calculation when its stream's starting position % 4 != 0 #1299

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

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/878
Author: @Morilli
Created: 10/29/2024
Status: Merged
Merged: 12/20/2024
Merged by: @adamhathcock

Base: masterHead: fix-xzblock-padding


📝 Commits (4)

  • 881d275 Add failing test
  • 9b0e0ee Fix padding calculation when initial position % 4 != 0
  • f51bdd5 expose Position getter in ForwardOnlyStream
  • 10cc270 Merge branch 'master' into fix-xzblock-padding

📊 Changes

3 files changed (+19 additions, -4 deletions)

View changed files

📝 src/SharpCompress/Compressors/Xz/XZBlock.cs (+3 -3)
📝 tests/SharpCompress.Test/Mocks/ForwardOnlyStream.cs (+1 -1)
📝 tests/SharpCompress.Test/Xz/XZBlockTests.cs (+15 -0)

📄 Description

I've also removed the unused _bytesRead field that seems to have last been touched in #300.


🔄 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/878 **Author:** [@Morilli](https://github.com/Morilli) **Created:** 10/29/2024 **Status:** ✅ Merged **Merged:** 12/20/2024 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `fix-xzblock-padding` --- ### 📝 Commits (4) - [`881d275`](https://github.com/adamhathcock/sharpcompress/commit/881d2756db13c0968ca1e4c9c92ffb963170ce9d) Add failing test - [`9b0e0ee`](https://github.com/adamhathcock/sharpcompress/commit/9b0e0ee536098c29a7d6f1bd22e4b12d88134884) Fix padding calculation when initial position % 4 != 0 - [`f51bdd5`](https://github.com/adamhathcock/sharpcompress/commit/f51bdd56aa2247ffc84a64fb835ce770224f40f2) expose Position getter in ForwardOnlyStream - [`10cc270`](https://github.com/adamhathcock/sharpcompress/commit/10cc270170fe13836f9c48399343918210951dcf) Merge branch 'master' into fix-xzblock-padding ### 📊 Changes **3 files changed** (+19 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/SharpCompress/Compressors/Xz/XZBlock.cs` (+3 -3) 📝 `tests/SharpCompress.Test/Mocks/ForwardOnlyStream.cs` (+1 -1) 📝 `tests/SharpCompress.Test/Xz/XZBlockTests.cs` (+15 -0) </details> ### 📄 Description - closes #873 I've also removed the unused `_bytesRead` field that seems to have last been touched in #300. --- <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:19:52 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1299