public virtual byte[] GetBytes() { byte[] tmp = new byte[size]; tmp[0] = magic; BitConverter.GetBytes(length).CopyTo(tmp, 1); BitConverter.GetBytes(CRC).CopyTo(tmp, 3); return tmp; }