summary refs log tree commit diff
path: root/crypto/src/util/io/compression/Bzip2.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/util/io/compression/Bzip2.cs')
-rw-r--r--crypto/src/util/io/compression/Bzip2.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/src/util/io/compression/Bzip2.cs b/crypto/src/util/io/compression/Bzip2.cs
index 72b006dc9..cf84923a2 100644
--- a/crypto/src/util/io/compression/Bzip2.cs
+++ b/crypto/src/util/io/compression/Bzip2.cs
@@ -13,9 +13,11 @@ namespace Org.BouncyCastle.Utilities.IO.Compression
                 :   new Impl.CBZip2OutputStream(stream);
         }
 
-        internal static Stream DecompressInput(Stream stream)
+        internal static Stream DecompressInput(Stream stream, bool leaveOpen = false)
         {
-            return new Impl.CBZip2InputStream(stream);
+            return leaveOpen
+                ?   new Impl.CBZip2InputStreamLeaveOpen(stream)
+                :   new Impl.CBZip2InputStream(stream);
         }
     }
 }