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.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crypto/src/util/io/compression/Bzip2.cs b/crypto/src/util/io/compression/Bzip2.cs
new file mode 100644
index 000000000..72b006dc9
--- /dev/null
+++ b/crypto/src/util/io/compression/Bzip2.cs
@@ -0,0 +1,21 @@
+using System.IO;
+
+namespace Org.BouncyCastle.Utilities.IO.Compression
+{
+    using Impl = Utilities.Bzip2;
+
+    internal static class Bzip2
+    {
+        internal static Stream CompressOutput(Stream stream, bool leaveOpen = false)
+        {
+            return leaveOpen
+                ?   new Impl.CBZip2OutputStreamLeaveOpen(stream)
+                :   new Impl.CBZip2OutputStream(stream);
+        }
+
+        internal static Stream DecompressInput(Stream stream)
+        {
+            return new Impl.CBZip2InputStream(stream);
+        }
+    }
+}