sharpcompress icon indicating copy to clipboard operation
sharpcompress copied to clipboard

Not implemented Stream methods are expected to throw NotSupportedException

Open claunia opened this issue 4 years ago • 2 comments

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

claunia avatar Aug 24 '20 20:08 claunia

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

adamhathcock avatar Aug 25 '20 13:08 adamhathcock

I think this has been already resolved.

ds5678 avatar Dec 23 '22 05:12 ds5678