File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/ICSharpCode.SharpZipLib/Zip Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,9 @@ private void WriteLeLong(long value)
206
206
/// Entry name is too long<br/>
207
207
/// Finish has already been called<br/>
208
208
/// </exception>
209
+ /// <exception cref="System.NotImplementedException">
210
+ /// The Compression method specified for the entry is unsupported.
211
+ /// </exception>
209
212
public void PutNextEntry ( ZipEntry entry )
210
213
{
211
214
if ( entry == null )
@@ -229,6 +232,13 @@ public void PutNextEntry(ZipEntry entry)
229
232
}
230
233
231
234
CompressionMethod method = entry . CompressionMethod ;
235
+
236
+ // Check that the compression is one that we support
237
+ if ( method != CompressionMethod . Deflated && method != CompressionMethod . Stored )
238
+ {
239
+ throw new NotImplementedException ( "Compression method not supported" ) ;
240
+ }
241
+
232
242
int compressionLevel = defaultCompressionLevel ;
233
243
234
244
// Clear flags that the library manages internally
You can’t perform that action at this time.
0 commit comments