mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +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");
|
throw new FileFormatException ("GRP image encoder not available");
|
||||||
bool is_grp = grp.Signature == FormatCatalog.ReadSignature (input);
|
bool is_grp = grp.Signature == FormatCatalog.ReadSignature (input);
|
||||||
input.Position = 0;
|
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)
|
if (is_grp)
|
||||||
{
|
{
|
||||||
|
@ -434,7 +434,8 @@ NextEntry:
|
|||||||
writer.Write (unpacked_dir_size);
|
writer.Write (unpacked_dir_size);
|
||||||
|
|
||||||
long dir_start = writer.BaseStream.Position;
|
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);
|
header.BaseStream.CopyTo (zstream);
|
||||||
|
|
||||||
long packed_dir_size = writer.BaseStream.Position - dir_start;
|
long packed_dir_size = writer.BaseStream.Position - dir_start;
|
||||||
@ -468,7 +469,7 @@ NextEntry:
|
|||||||
};
|
};
|
||||||
if (compress)
|
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);
|
xp3entry.Hash = CheckedCopy (file, zstream);
|
||||||
zstream.Flush();
|
zstream.Flush();
|
||||||
@ -505,7 +506,7 @@ NextEntry:
|
|||||||
bool need_output_dispose = false;
|
bool need_output_dispose = false;
|
||||||
if (compress)
|
if (compress)
|
||||||
{
|
{
|
||||||
output = new ZLibStream (output, CompressionMode.Compress, true);
|
output = new ZLibStream (output, CompressionMode.Compress, CompressionLevel.Level9, true);
|
||||||
need_output_dispose = true;
|
need_output_dispose = true;
|
||||||
}
|
}
|
||||||
unsafe
|
unsafe
|
||||||
|
@ -184,7 +184,8 @@ namespace GameRes.Formats.YuRis
|
|||||||
{
|
{
|
||||||
if (entry.IsPacked)
|
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);
|
input.CopyTo (zstream);
|
||||||
zstream.Flush();
|
zstream.Flush();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user