public void CopyByteArray(ref ByteInputStream input, int maxCount) { int count = input.ReadUInt16(); GameDebug.Assert(count <= maxCount); WriteUInt16((ushort)count); input.ReadBytes(m_Buffer, m_CurrentByteIdx, count, maxCount); for (int i = count; i < maxCount; i++) { m_Buffer[m_CurrentByteIdx + i] = 0; } m_CurrentByteIdx += maxCount; }
public void CopyByteArray(ref ByteInputStream input, int maxCount) { var count = (int)input.ReadUInt16(); WriteUIntPacked((uint)count); if (count > 0) { Align(); input.ReadBytes(m_Buffer, m_CurrentByteIdx, count, maxCount); m_CurrentByteIdx += count; } else { input.SkipBytes(maxCount); } }
public void CopyBytes(ref ByteInputStream input, int count) { input.ReadBytes(m_Buffer, m_CurrentByteIdx, count, count); m_CurrentByteIdx += count; }