adamhathcock / sharpcompress

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

Not implemented Stream methods are expected to throw NotSupportedException #535

Open claunia opened 3 years ago

claunia commented 3 years ago

Hi,

As in https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/Compressors/LZMA/LZipStream.cs#L108

all other software expects that to throw a NotSupportedException as a normal condition to detect they cannot seek or get the size, however throwing a NotImplementedException makes other libraries (e.g. DotNetZip) not work properly.

E.g.: https://github.com/haf/DotNetZip.Semverd/blob/fbad143e71ab3069b1bd7ae17eabb81543747457/src/Zip.Shared/ZipEntry.Write.cs#L1510

adamhathcock commented 3 years ago

Happy to change the exception if you don't mind submitting a PR to clean that exception (and possibly other locations)

ds5678 commented 1 year ago

I think this has been already resolved.