Exemplo n.º 1
0
        public Hght ReadHghtMetadata()
        {
            Hght hght     = null;
            long?position = SMFileUtils.FindNextString(this, Hght.Identifier);

            if (position.HasValue)
            {
                hght = new Hght();
                hght.HeaderOffset = position.Value;
                hght.SizeOffset   = position.Value + Hght.Identifier.Length;
                this.BaseStream.Seek(position.Value + Hght.Identifier.Length, SeekOrigin.Begin);
                hght.Size          = BitConverter.ToUInt32(this.ReadBytes(4), 0);
                hght.ContentOffset = this.BaseStream.Position;
            }
            return(hght);
        }
Exemplo n.º 2
0
        public Coli ReadColiMetadata()
        {
            Coli coli     = null;
            long?position = SMFileUtils.FindNextString(this, Coli.Identifier);

            if (position.HasValue)
            {
                coli = new Coli();
                coli.HeaderOffset = position.Value;
                coli.SizeOffset   = position.Value + Coli.Identifier.Length;
                this.BaseStream.Seek(position.Value + Coli.Identifier.Length, SeekOrigin.Begin);
                coli.Size          = BitConverter.ToUInt32(this.ReadBytes(4), 0);
                coli.ContentOffset = this.BaseStream.Position;
            }
            return(coli);
        }