/// <summary> /// Convert to bytes. /// </summary> /// <returns>Bytes</returns> public byte[] ToBytes() { using (var memStream = new MemoryStream()) using (var writer = new BinaryWriter(memStream)) { ReadWriteUtils.WriteU32(writer, this.Version); // Version 0 writer.Write(this.Hash); writer.Write(ReadWriteUtils.Byteswap32(this.Flags)); return(memStream.ToArray()); } }