mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #300] [MERGED] XZ: fix padding issues #952
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/300
Author: @frabar666
Created: 9/17/2017
Status: ✅ Merged
Merged: 9/17/2017
Merged by: @adamhathcock
Base:
master← Head:fix-padding📝 Commits (4)
f2ed1dfXZ: fix variable-length integers decoding27a01f0XZ: fix block and index padding issuesc80afa9cleanup in XZStreamTestsb1fbae8Merge branch 'master' into fix-padding📊 Changes
6 files changed (+180 additions, -11 deletions)
View changed files
📝
src/SharpCompress/Compressors/Xz/XZBlock.cs(+4 -4)📝
src/SharpCompress/Compressors/Xz/XZIndex.cs(+3 -3)📝
tests/SharpCompress.Test/Xz/XZBlockTests.cs(+25 -0)📝
tests/SharpCompress.Test/Xz/XZIndexTests.cs(+52 -2)📝
tests/SharpCompress.Test/Xz/XZStreamTests.cs(+24 -2)📝
tests/SharpCompress.Test/Xz/XZTestsBase.cs(+72 -0)📄 Description
SkipPaddinginXZBlockandXZIndexdid not always skip the right number of bytes:This PR fixes both
SkipPaddingmethods, resolves #289 and resolves #296.I added unit tests using two new inline XZ files (an empty one, and one with 2 blocks), in order to test more cases.
Note that this relies on my previous PR #299: I created a new branch on top of the one I used for the previous PR, not sure if that was the right way to go...
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.