removed redundant ArcView.Reader instances.

This commit is contained in:
morkt
2016-10-17 16:57:13 +04:00
parent 375e162959
commit 84985d18f5
5 changed files with 47 additions and 55 deletions

View File

@@ -97,18 +97,15 @@ namespace GameRes.Formats.Kaguya
public byte[] Data { get { return m_output; } }
public BmrDecoder (Stream input)
public BmrDecoder (IBinaryStream input)
{
input.Position = 3;
using (var header = new ArcView.Reader (input))
{
m_step = header.ReadByte();
m_final_size = header.ReadInt32();
m_key = header.ReadInt32();
int unpacked_size = header.ReadInt32();
m_output = new byte[unpacked_size];
m_input = new MsbBitStream (input, true);
}
m_step = input.ReadUInt8();
m_final_size = input.ReadInt32();
m_key = input.ReadInt32();
int unpacked_size = input.ReadInt32();
m_output = new byte[unpacked_size];
m_input = new MsbBitStream (input.AsStream, true);
}
public void Unpack ()