add better length from master

This commit is contained in:
Adam Hathcock
2026-02-14 10:34:12 +00:00
parent cdb13da054
commit 13fdb4d7ca

View File

@@ -206,8 +206,22 @@ internal partial class SharpCompressStream : Stream, IStreamStack
throw new NotSupportedException();
}
public override long Length =>
_isPassthrough ? stream.Length : throw new NotSupportedException();
public override long Length
{
get
{
if (_isPassthrough)
{
return stream.Length;
}
if (_ringBuffer is not null)
{
return _ringBuffer.Length;
}
throw new NotSupportedException();
}
}
public override long Position
{