From 2420cfa07c2a6295409a076c7c04b5d329e07f26 Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 24 Aug 2014 08:42:38 +0400 Subject: [PATCH] minor DRG compression fix. --- ArcFormats/ImageDRG.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ArcFormats/ImageDRG.cs b/ArcFormats/ImageDRG.cs index 545d7605..8c92c4f3 100644 --- a/ArcFormats/ImageDRG.cs +++ b/ArcFormats/ImageDRG.cs @@ -369,14 +369,6 @@ namespace GameRes.Formats.DRS WindowPosition pos = new WindowPosition { Offset = 0, Length = 0 }; if (win_begin == win_end) return pos; - if (m_input[win_end-1] == m_input[buf_begin]) - { - pos.Offset = 1; - var match_end = Mismatch (buf_begin+1, buf_end, win_end); - pos.Length = (ushort)(match_end - (win_end-1)); - if (MaxMatchSize == pos.Length) - return pos; - } SortedSet found; if (m_dict.TryGetValue (m_input[buf_begin], out found)) { @@ -389,7 +381,7 @@ namespace GameRes.Formats.DRS { pos.Offset = (ushort)distance; pos.Length = (ushort)weight; - if (MaxMatchSize == weight && distance < 0x100) + if (MaxMatchSize == weight) break; } }