Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LzoStream.Flush shouldn't throw NotSupportedException #2

Closed
DRKV333 opened this issue Jul 7, 2019 · 0 comments
Closed

LzoStream.Flush shouldn't throw NotSupportedException #2

DRKV333 opened this issue Jul 7, 2019 · 0 comments

Comments

@DRKV333
Copy link

DRKV333 commented Jul 7, 2019

Currently calling LzoStream.Flush() trows a NotSupportedException:

lzo.net/src/LzoStream.cs

Lines 476 to 479 in 6c84b61

public override void Flush()
{
throw new NotSupportedException();
}

This can cause problems, because certain other .NET library function will always attempt to call Flush after they are done with the stream. Specifically, I ran into this issue while trying to use a CryptoStream to hash the contents of an LzoStream.

According to the documentation, Stream.Flush() should normally be implemented as an empty method for read-only streams. https://docs.microsoft.com/en-us/dotnet/api/system.io.stream.flush

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant