File tree Expand file tree Collapse file tree
benchmark/ICSharpCode.SharpZipLib.Benchmark/Zip Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55namespace ICSharpCode . SharpZipLib . Benchmark . Zip
66{
7+ [ MemoryDiagnoser ]
78 [ Config ( typeof ( MultipleRuntimes ) ) ]
89 public class ZipInputStream
910 {
@@ -12,6 +13,7 @@ public class ZipInputStream
1213 private const int N = ChunkCount * ChunkSize ;
1314
1415 byte [ ] zippedData ;
16+ byte [ ] readBuffer = new byte [ 4096 ] ;
1517
1618 public ZipInputStream ( )
1719 {
@@ -40,10 +42,9 @@ public long ReadZipInputStream()
4042 {
4143 using ( var zipInputStream = new SharpZipLib . Zip . ZipInputStream ( memoryStream ) )
4244 {
43- var buffer = new byte [ 4096 ] ;
4445 var entry = zipInputStream . GetNextEntry ( ) ;
4546
46- while ( zipInputStream . Read ( buffer , 0 , buffer . Length ) > 0 )
47+ while ( zipInputStream . Read ( readBuffer , 0 , readBuffer . Length ) > 0 )
4748 {
4849
4950 }
Original file line number Diff line number Diff line change 44
55namespace ICSharpCode . SharpZipLib . Benchmark . Zip
66{
7+ [ MemoryDiagnoser ]
78 [ Config ( typeof ( MultipleRuntimes ) ) ]
89 public class ZipOutputStream
910 {
You can’t perform that action at this time.
0 commit comments