Initial import
git-svn-id: https://lsleditor.svn.sourceforge.net/svnroot/lsleditor@1 3f4676ac-adda-40fd-8265-58d1435b1672
This commit is contained in:
commit
7d308772cf
453 changed files with 57506 additions and 0 deletions
24
BZip2Decompress/BZip2.cs
Normal file
24
BZip2Decompress/BZip2.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue