LSLEditor/BZip2Decompress/BZip2.cs
dimentox 7d308772cf Initial import
git-svn-id: https://lsleditor.svn.sourceforge.net/svnroot/lsleditor@1 3f4676ac-adda-40fd-8265-58d1435b1672
2010-04-29 03:23:31 +00:00

24 lines
511 B
C#

using System;
using System.IO;
// BZip2.Decompress(File.OpenRead("in"), File.Create("out"));
namespace LSLEditor.BZip2Decompress
{
public sealed class Decompressor
{
public static void Decompress(Stream inStream, Stream outStream)
{
using ( outStream ) {
using ( BZip2InputStream bzis = new BZip2InputStream(inStream) ) {
int ch = bzis.ReadByte();
while (ch != -1) {
outStream.WriteByte((byte)ch);
ch = bzis.ReadByte();
}
}
}
}
}
}