Пример #1
0
 public int GetSize() => Header.HeaderSize + Palette.Size + WidthTable.Size() + Unknown.Size() + Reserved.Size + Compressed.Size();
Пример #2
0
        public byte[] GetData()
        {
            byte[] returned;

            using (MemoryStream MS = new MemoryStream())
            {
                BinaryWriter writer = new BinaryWriter(MS);

                Header.FileSize = 1 + Header.HeaderSize + Palette.Size + Reserved.Size + Compressed.Size();

                Header.Get(writer);
                Palette.Get(writer);
                WidthTable.Get(writer);
                Unknown.Get(writer);
                Reserved.Get(writer);
                Compressed.Get(writer);
                if (Last != null)
                {
                    Header.LastPosition        = Last.Get(writer);
                    writer.BaseStream.Position = 0;
                    Header.Get(writer);
                }

                returned = MS.ToArray();
            }

            return(returned);
        }
Пример #3
0
 public int Size()
 {
     return(Header.HeaderSize + Palette.Size + WidthTable.Size() + Unknown.Size() + Reserved.Size + Compressed.Size());
 }