adamhathcock / sharpcompress

SharpCompress is a fully managed C# library to deal with many compression types and formats.
MIT License
2.22k stars 476 forks source link

Flush should probably not throw NotSupportedException #771

Open carlreinke opened 9 months ago

carlreinke commented 9 months ago

According to the Stream.Flush docs:

In a class derived from Stream that doesn't support writing, Flush is typically implemented as an empty method to ensure full compatibility with other Stream types since it's valid to flush a read-only stream.

https://github.com/adamhathcock/sharpcompress/blob/66c92637f9f5c07f9d644d40975833c6ba256190/src/SharpCompress/Compressors/LZMA/DecoderStream.cs#L17

adamhathcock commented 9 months ago

Good catch and good PR