diff --git a/src/ICSharpCode.SharpZipLib/Zip/ZipEntry.cs b/src/ICSharpCode.SharpZipLib/Zip/ZipEntry.cs index c607cf9f2..f14b005f2 100644 --- a/src/ICSharpCode.SharpZipLib/Zip/ZipEntry.cs +++ b/src/ICSharpCode.SharpZipLib/Zip/ZipEntry.cs @@ -724,17 +724,13 @@ public long Crc /// /// Gets/Sets the compression method. /// - /// Throws exception when set if the method is not valid as per - /// /// /// The compression method for this entry /// public CompressionMethod CompressionMethod { get => method; - set => method = !IsCompressionMethodSupported(value) - ? throw new NotSupportedException("Compression method not supported") - : value; + set => method = value; } /// diff --git a/test/ICSharpCode.SharpZipLib.Tests/Zip/GeneralHandling.cs b/test/ICSharpCode.SharpZipLib.Tests/Zip/GeneralHandling.cs index e2c2072c6..c3e32064c 100644 --- a/test/ICSharpCode.SharpZipLib.Tests/Zip/GeneralHandling.cs +++ b/test/ICSharpCode.SharpZipLib.Tests/Zip/GeneralHandling.cs @@ -133,18 +133,6 @@ private string DescribeAttributes(FieldAttributes attributes) return att; } - [Test] - [Category("Zip")] - //[ExpectedException(typeof(NotSupportedException))] - public void UnsupportedCompressionMethod() - { - var ze = new ZipEntry("HumblePie"); - //ze.CompressionMethod = CompressionMethod.BZip2; - - Assert.That(() => ze.CompressionMethod = CompressionMethod.Deflate64, - Throws.TypeOf()); - } - /// /// Invalid passwords should be detected early if possible, seekable stream /// Note: Have a 1/255 chance of failing due to CRC collision (hence retried once)