예제 #1
0
        public void Write(Stream stream)
        {
            StreamHelperLe.WriteString(stream, Id);

            StreamHelperLe.WriteUInt32(stream, Size);

            stream.Write(Data, 0, (int)Size);
            //if (Pad > 0) stream.WriteByte(0);
        }
예제 #2
0
        public void Read(Stream stream)
        {
            Id = StreamHelperLe.ReadString(stream, 4);

            Size = StreamHelperLe.ReadUInt32(stream);
            Pad  = (byte)(Size & 0x1);

            Data = new byte[Size];
            stream.Read(Data, 0, (int)Size);
            stream.Position += Pad;
        }