mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +08:00
changed zlib compression level to maximum (Level9).
This commit is contained in:
parent
c4834692cf
commit
97b9e28fbc
@ -301,7 +301,7 @@ namespace GameRes.Formats
|
||||
throw new FileFormatException ("GRP image encoder not available");
|
||||
bool is_grp = grp.Signature == FormatCatalog.ReadSignature (input);
|
||||
input.Position = 0;
|
||||
using (var zstream = new ZLibStream (output, CompressionMode.Compress, true))
|
||||
using (var zstream = new ZLibStream (output, CompressionMode.Compress, CompressionLevel.Level9, true))
|
||||
{
|
||||
if (is_grp)
|
||||
{
|
||||
|
@ -434,7 +434,8 @@ NextEntry:
|
||||
writer.Write (unpacked_dir_size);
|
||||
|
||||
long dir_start = writer.BaseStream.Position;
|
||||
using (var zstream = new ZLibStream (writer.BaseStream, CompressionMode.Compress, true))
|
||||
using (var zstream = new ZLibStream (writer.BaseStream, CompressionMode.Compress,
|
||||
CompressionLevel.Level9, true))
|
||||
header.BaseStream.CopyTo (zstream);
|
||||
|
||||
long packed_dir_size = writer.BaseStream.Position - dir_start;
|
||||
@ -468,7 +469,7 @@ NextEntry:
|
||||
};
|
||||
if (compress)
|
||||
{
|
||||
using (var zstream = new ZLibStream (output, CompressionMode.Compress, true))
|
||||
using (var zstream = new ZLibStream (output, CompressionMode.Compress, CompressionLevel.Level9, true))
|
||||
{
|
||||
xp3entry.Hash = CheckedCopy (file, zstream);
|
||||
zstream.Flush();
|
||||
@ -505,7 +506,7 @@ NextEntry:
|
||||
bool need_output_dispose = false;
|
||||
if (compress)
|
||||
{
|
||||
output = new ZLibStream (output, CompressionMode.Compress, true);
|
||||
output = new ZLibStream (output, CompressionMode.Compress, CompressionLevel.Level9, true);
|
||||
need_output_dispose = true;
|
||||
}
|
||||
unsafe
|
||||
|
@ -184,7 +184,8 @@ namespace GameRes.Formats.YuRis
|
||||
{
|
||||
if (entry.IsPacked)
|
||||
{
|
||||
using (var zstream = new ZLibStream (checked_stream, CompressionMode.Compress, true))
|
||||
using (var zstream = new ZLibStream (checked_stream, CompressionMode.Compress,
|
||||
CompressionLevel.Level9, true))
|
||||
{
|
||||
input.CopyTo (zstream);
|
||||
zstream.Flush();
|
||||
|
Loading…
x
Reference in New Issue
Block a user