mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
use 'zlib' compression method instead of 'deflate'.
This commit is contained in:
@@ -12,13 +12,16 @@ class Inflate
|
|||||||
public static void Main (string[] args)
|
public static void Main (string[] args)
|
||||||
{
|
{
|
||||||
if (args.Length != 2)
|
if (args.Length != 2)
|
||||||
|
{
|
||||||
|
Console.WriteLine ("Usage: deflate INPUT-FILE OUTPUT-FILE");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var input = File.Open (args[0], FileMode.Open, FileAccess.Read))
|
using (var input = File.Open (args[0], FileMode.Open, FileAccess.Read))
|
||||||
using (var output = File.Create (args[1]))
|
using (var output = File.Create (args[1]))
|
||||||
using (var stream = new DeflateStream (output, CompressionMode.Compress, CompressionLevel.Level5))
|
using (var stream = new ZLibStream (output, CompressionMode.Compress, CompressionLevel.Level9))
|
||||||
input.CopyTo (stream);
|
input.CopyTo (stream);
|
||||||
Console.WriteLine ("{0} => {1}", args[0], args[1]);
|
Console.WriteLine ("{0} => {1}", args[0], args[1]);
|
||||||
}
|
}
|
||||||
catch (Exception X)
|
catch (Exception X)
|
||||||
|
|||||||
Reference in New Issue
Block a user