Merge pull request #1234 from adamhathcock/copilot/sub-pr-1233

Fix SharpCompressStream.Create() buffer size misalignment for non-seekable streams
This commit is contained in:
Adam Hathcock
2026-02-25 13:13:56 +00:00
committed by GitHub
3 changed files with 2 additions and 33 deletions

View File

@@ -107,6 +107,6 @@ public partial class SharpCompressStream
// For non-seekable streams, create a SharpCompressStream with rolling buffer
// to allow limited backward seeking (required by decompressors that over-read)
return new SharpCompressStream(stream, false, false, bufferSize);
return new SharpCompressStream(stream, false, false, rewindableBufferSize);
}
}

View File

@@ -181,7 +181,7 @@ public partial class SharpCompressStream : Stream, IStreamStack
// Ensure ring buffer exists
if (_ringBuffer is null)
{
_ringBuffer = new RingBuffer(Constants.BufferSize);
_ringBuffer = new RingBuffer(Constants.RewindableBufferSize);
}
// Mark current position as recording anchor

View File

@@ -309,30 +309,6 @@
}
}
},
".NETFramework,Version=v4.8/win-x86": {
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
"dependencies": {
"System.Security.AccessControl": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
},
"System.Security.AccessControl": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
"dependencies": {
"System.Security.Principal.Windows": "5.0.0"
}
},
"System.Security.Principal.Windows": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
}
},
"net10.0": {
"AwesomeAssertions": {
"type": "Direct",
@@ -545,13 +521,6 @@
"resolved": "8.0.0",
"contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw=="
}
},
"net10.0/win-x86": {
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg=="
}
}
}
}