mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
EntryStream.Length should delegate to the underlying stream #294
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?
Originally created by @coderb on GitHub (Apr 26, 2018).
adam-
Could you please make the change below?
I have a use case where I want to check the uncompressed stream size.
thanks,
b
EntryStream.cs:
from:
public override long Length
{
get { throw new NotSupportedException(); }
}
to:
public override long Length
{
get { return stream.Length; }
}
@adamhathcock commented on GitHub (Apr 26, 2018):
Are you sure that would work? Usually the streams don't know their length because they're compressed. I guess certain use-cases it would work.
@coderb commented on GitHub (Apr 26, 2018):
It works for RARs as the header contains the uncomrpessed size and hopefully for others that don't know will continue to throw NotSupportedException.