mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-11 13:35:00 +00:00
[PR #679] Fix LZMADecoder Code function #1160
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?
Original Pull Request: https://github.com/adamhathcock/sharpcompress/pull/679
State: closed
Merged: Yes
It seems using LZMADecoder to attempt to decompress a byte array rise an exception. After investigation, it seems to originate from two statements added to the original 7zip classes :
if (!rangeDecoder.IsFinished || (inSize > 0 && rangeDecoder._total != inSize)) { throw new DataErrorException(); } if (_outWindow.HasPending) { throw new DataErrorException(); }
Removing it seems to fix the issue.
This function is not use elsewhere in the project.
Adding it back will cause the test case TestLzmaBuffer to fail.