@@ -387,6 +387,23 @@ private bool HaveKeys
387
387
388
388
#region Constructors
389
389
390
+ /// <summary>
391
+ /// Opens a Zip file with the given name for reading.
392
+ /// </summary>
393
+ /// <param name="name">The name of the file to open.</param>
394
+ /// <exception cref="ArgumentNullException">The argument supplied is null.</exception>
395
+ /// <exception cref="IOException">
396
+ /// An i/o error occurs
397
+ /// </exception>
398
+ /// <exception cref="ZipException">
399
+ /// The file doesn't contain a valid zip archive.
400
+ /// </exception>
401
+ public ZipFile ( string name ) :
402
+ this ( name , null )
403
+ {
404
+
405
+ }
406
+
390
407
/// <summary>
391
408
/// Opens a Zip file with the given name for reading.
392
409
/// </summary>
@@ -399,7 +416,7 @@ private bool HaveKeys
399
416
/// <exception cref="ZipException">
400
417
/// The file doesn't contain a valid zip archive.
401
418
/// </exception>
402
- public ZipFile ( string name , StringCodec stringCodec = null )
419
+ public ZipFile ( string name , StringCodec stringCodec )
403
420
{
404
421
name_ = name ?? throw new ArgumentNullException ( nameof ( name ) ) ;
405
422
@@ -500,6 +517,29 @@ public ZipFile(Stream stream) :
500
517
501
518
}
502
519
520
+ /// <summary>
521
+ /// Opens a Zip file reading the given <see cref="Stream"/>.
522
+ /// </summary>
523
+ /// <param name="stream">The <see cref="Stream"/> to read archive data from.</param>
524
+ /// <param name="leaveOpen">true to leave the <see cref="Stream">stream</see> open when the ZipFile is disposed, false to dispose of it</param>
525
+ /// <exception cref="IOException">
526
+ /// An i/o error occurs
527
+ /// </exception>
528
+ /// <exception cref="ZipException">
529
+ /// The stream doesn't contain a valid zip archive.<br/>
530
+ /// </exception>
531
+ /// <exception cref="ArgumentException">
532
+ /// The <see cref="Stream">stream</see> doesnt support seeking.
533
+ /// </exception>
534
+ /// <exception cref="ArgumentNullException">
535
+ /// The <see cref="Stream">stream</see> argument is null.
536
+ /// </exception>
537
+ public ZipFile ( Stream stream , bool leaveOpen ) :
538
+ this ( stream , leaveOpen , null )
539
+ {
540
+
541
+ }
542
+
503
543
/// <summary>
504
544
/// Opens a Zip file reading the given <see cref="Stream"/>.
505
545
/// </summary>
@@ -518,7 +558,7 @@ public ZipFile(Stream stream) :
518
558
/// <exception cref="ArgumentNullException">
519
559
/// The <see cref="Stream">stream</see> argument is null.
520
560
/// </exception>
521
- public ZipFile ( Stream stream , bool leaveOpen , StringCodec stringCodec = null )
561
+ public ZipFile ( Stream stream , bool leaveOpen , StringCodec stringCodec )
522
562
{
523
563
if ( stream == null )
524
564
{
0 commit comments