static long AdvanceToNextChunk(BinaryReader br, long curPos, ref uint type, ref uint size)
{
br.BaseStream.Seek(curPos + size, SeekOrigin.Begin);
if (br.BaseStream.Position == br.BaseStream.Length)
{
return br.BaseStream.Length;
}
type = br.ReadUInt32();
size = br.ReadUInt32();
long newCurPos = br.BaseStream.Position;
return newCurPos;
}