public static void Decompress(Stream inStream, Stream outStream) { if (inStream == null) { throw new ArgumentNullException("inStream"); } if (outStream == null) { throw new ArgumentNullException("outStream"); } try { using (BZip2InputStream bzip2InputStream = new BZip2InputStream(inStream)) { for (int num = bzip2InputStream.ReadByte(); num != -1; num = bzip2InputStream.ReadByte()) { outStream.WriteByte((byte)num); } } } finally { if (outStream != null) { ((IDisposable)outStream).Dispose(); } } }
/// <summary> /// Decompress <paramref name="inStream">input</paramref> writing /// decompressed data to the <paramref name="outStream">output stream</paramref> /// </summary> /// <param name="inStream">The stream containing data to decompress.</param> /// <param name="outStream">The stream to write decompressed data to.</param> /// <remarks>Both streams are closed on completion</remarks> public static void Decompress(Stream inStream, Stream outStream) { if (inStream == null) { throw new ArgumentNullException("inStream"); } if (outStream == null) { throw new ArgumentNullException("outStream"); } using (outStream) { using (BZip2InputStream bzis = new BZip2InputStream(inStream)) { int ch = bzis.ReadByte(); while (ch != -1) { outStream.WriteByte((byte)ch); ch = bzis.ReadByte(); } } } }
public static void Decompress(Stream instream, Stream outstream) { System.IO.Stream bos = outstream; System.IO.Stream bis = instream; BZip2InputStream bzis = new BZip2InputStream(bis); int ch = bzis.ReadByte(); while (ch != -1) { bos.WriteByte((byte)ch); ch = bzis.ReadByte(); } bos.Flush(); }
public static void Decompress(Stream instream, Stream outstream) { Stream stream = outstream; Stream stream2 = instream; BZip2InputStream stream3 = new BZip2InputStream(stream2); for (int i = stream3.ReadByte(); i != -1; i = stream3.ReadByte()) { stream.WriteByte((byte)i); } stream.Flush(); }
/// <summary> /// Decompress <paramref name="instream">input</paramref> writing /// decompressed data to <paramref name="outstream">output stream</paramref> /// </summary> public static void Decompress(Stream instream, Stream outstream) { var bos = outstream; var bis = instream; var bzis = new BZip2InputStream(bis); var ch = bzis.ReadByte(); while (ch != -1) { bos.WriteByte((byte)ch); ch = bzis.ReadByte(); } bos.Flush(); }
/// <summary> /// Decompress <paramref name="instream">input</paramref> writing /// decompressed data to <paramref name="outstream">output stream</paramref> /// </summary> public static void Decompress(Stream instream, Stream outstream) { System.IO.Stream bos = outstream; System.IO.Stream bis = instream; BZip2InputStream bzis = new BZip2InputStream(bis); int ch = bzis.ReadByte(); while (ch != -1) { bos.WriteByte((byte)ch); ch = bzis.ReadByte(); } bos.Flush(); }
public static void Decompress(Stream inStream, Stream outStream) { if ( inStream == null ) { throw new ArgumentNullException("inStream"); } if ( outStream == null ) { throw new ArgumentNullException("outStream"); } using ( outStream ) { using ( BZip2InputStream bzis = new BZip2InputStream(inStream) ) { int ch = bzis.ReadByte(); while (ch != -1) { outStream.WriteByte((byte)ch); ch = bzis.ReadByte(); } } } }
public static void Decompress(Stream inStream, Stream outStream) { if (inStream == null) { throw new ArgumentNullException("inStream"); } if (outStream == null) { throw new ArgumentNullException("outStream"); } using (outStream) { using (BZip2InputStream stream = new BZip2InputStream(inStream)) { for (int i = stream.ReadByte(); i != -1; i = stream.ReadByte()) { outStream.WriteByte((byte)i); } } } }