mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 05:35:34 +08:00
Actually init arrays.
This commit is contained in:
parent
ab67cb5187
commit
071a33eb94
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user