示例#1
0
        public byte[] GetBytes()
        {
            var array = new byte[GetSize()];

            int index = 0;

            // IDBLOCK.
            IDBlock.Write(array, ref index);

            int hdBlockIndex = index;

            // HDBLOCK.
            HDBlock.Write(array, ref index);
            HDBlock.WriteFileComment(array, ref index, hdBlockIndex);
            HDBlock.WriteProgramBlock(array, ref index, hdBlockIndex);
            HDBlock.WriteFirstDataGroupLink(array, index, hdBlockIndex);

            // DGBLOCKs.
            DataGroups.Write(array, ref index);

            return(array);
        }