mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-22 23:15:20 +00:00
add better length from master
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user