diff --git a/ArcFormats/DxLib/ArcDX8.cs b/ArcFormats/DxLib/ArcDX8.cs index 9def10ed..17f7ca2f 100644 --- a/ArcFormats/DxLib/ArcDX8.cs +++ b/ArcFormats/DxLib/ArcDX8.cs @@ -147,7 +147,7 @@ namespace GameRes.Formats.DxLib byte[] huffmanBuffer = new byte[headerBuffer.Length]; byte[] lzBuffer; headerBuffer.CopyTo(huffmanBuffer, 0); - huffmanBuffer = headerBuffer; + //huffmanBuffer = headerBuffer; HuffmanDecoder decoder = new HuffmanDecoder(huffmanBuffer, (ulong)huffmanBuffer.LongLength); lzBuffer = decoder.Unpack(); MemoryStream lzStream = new MemoryStream(lzBuffer); diff --git a/ArcFormats/DxLib/HuffmanDecoder.cs b/ArcFormats/DxLib/HuffmanDecoder.cs index 26dd2e6e..11f61d86 100644 --- a/ArcFormats/DxLib/HuffmanDecoder.cs +++ b/ArcFormats/DxLib/HuffmanDecoder.cs @@ -35,7 +35,7 @@ using GameRes.Utility; namespace GameRes.Formats.DxLib { - internal struct DXA8HuffmanNode + internal class DXA8HuffmanNode { public UInt64 Weight; public int bitNumber; @@ -44,6 +44,13 @@ namespace GameRes.Formats.DxLib public int ParentNode; // index of parent node. public int[] ChildNode; //two children nodes, -1 if not existent. + + DXA8HuffmanNode() + { + bitArray = new byte[32]; + ChildNode = new int[2]; + } + } internal sealed class HuffmanDecoder