@@ -73,7 +73,6 @@ public class ZipInputStream : InflaterInputStream
73
73
private ZipEntry entry ;
74
74
75
75
private long size ;
76
- private CompressionMethod method ;
77
76
private int flags ;
78
77
private string password ;
79
78
@@ -191,7 +190,7 @@ public ZipEntry GetNextEntry()
191
190
var versionRequiredToExtract = ( short ) inputBuffer . ReadLeShort ( ) ;
192
191
193
192
flags = inputBuffer . ReadLeShort ( ) ;
194
- method = ( CompressionMethod ) inputBuffer . ReadLeShort ( ) ;
193
+ var method = ( CompressionMethod ) inputBuffer . ReadLeShort ( ) ;
195
194
var dostime = ( uint ) inputBuffer . ReadLeInt ( ) ;
196
195
int crc2 = inputBuffer . ReadLeInt ( ) ;
197
196
csize = inputBuffer . ReadLeInt ( ) ;
@@ -332,7 +331,7 @@ private void CompleteCloseEntry(bool testCrc)
332
331
333
332
crc . Reset ( ) ;
334
333
335
- if ( method == CompressionMethod . Deflated )
334
+ if ( entry . CompressionMethod == CompressionMethod . Deflated )
336
335
{
337
336
inf . Reset ( ) ;
338
337
}
@@ -360,7 +359,7 @@ public void CloseEntry()
360
359
return ;
361
360
}
362
361
363
- if ( method == CompressionMethod . Deflated )
362
+ if ( entry . CompressionMethod == CompressionMethod . Deflated )
364
363
{
365
364
if ( ( flags & 8 ) != 0 )
366
365
{
@@ -530,7 +529,7 @@ private int InitialRead(byte[] destination, int offset, int count)
530
529
531
530
if ( ( csize > 0 ) || ( ( flags & ( int ) GeneralBitFlags . Descriptor ) != 0 ) )
532
531
{
533
- if ( ( method == CompressionMethod . Deflated ) && ( inputBuffer . Available > 0 ) )
532
+ if ( ( entry . CompressionMethod == CompressionMethod . Deflated ) && ( inputBuffer . Available > 0 ) )
534
533
{
535
534
inputBuffer . SetInflaterInput ( inf ) ;
536
535
}
@@ -612,7 +611,7 @@ private int BodyRead(byte[] buffer, int offset, int count)
612
611
613
612
bool finished = false ;
614
613
615
- switch ( method )
614
+ switch ( entry . CompressionMethod )
616
615
{
617
616
case CompressionMethod . Deflated :
618
617
count = base . Read ( buffer , offset , count ) ;
0 commit comments