mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-11 13:35:00 +00:00
[PR #1017] [MERGED] Fix some IStreamStack and SharpCompressStream functions #1438
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/1017
Author: @Morilli
Created: 11/14/2025
Status: ✅ Merged
Merged: 11/14/2025
Merged by: @adamhathcock
Base:
master← Head:fix-streamstack📝 Commits (4)
97f58b4Add test for StackSeek behavior9a876abfix IStreamStack.StackSeek with buffering streams7835219fix SharpCompressStream BufferSize setter and Seek as welle3a25ecmake formatting worse with csharpier📊 Changes
3 files changed (+28 additions, -11 deletions)
View changed files
📝
src/SharpCompress/IO/IStreamStack.cs(+8 -9)📝
src/SharpCompress/IO/SharpCompressStream.cs(+2 -2)📝
tests/SharpCompress.Test/Streams/RewindableStreamTest.cs(+18 -0)📄 Description
Buffer handling seems to have been completely broken.
I've fixed the handling in
IStreamStack.StackSeekthat basically duplicated the logic fromSharpCompressStream.Seek(while not actually working correctly), fixed incorrect behavior of theIStreamStack.BufferPositionsetter and fixed and off-by-one inSharpCompressStream.Seek.I suspect there are more issues in
StackSeekthat may or may not even be relevant for how bufferedIStreamStacks are even used. It's hard to tell because the method documentation does not seem to fully match the implementation.This allows reverting #964 now that the underlying issue has been fixed.
TODO:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.