Exemplo n.º 1
0
        private Header ReadHeader()
        {
            Header header = new Header();

            HeaderFields fields = (HeaderFields)vcdReader.ReadByte();

            if (fields.Contains(HeaderFields.NotSupported))
            {
                throw new FormatException("unrecognized header indicator bits set");
            }

            header.SecondaryCompressor = SecondaryCompressor.None;
            if (fields.Contains(HeaderFields.SecondaryCompression))
            {
                throw new NotSupportedException("unavailable secondary compressor");
            }

            if (fields.Contains(HeaderFields.CodeTable))
            {
                throw new NotSupportedException("compressed code table not implemented");
            }

            if (fields.Contains(HeaderFields.ApplicationData))
            {
                header.ApplicationData = ReadApplicationData();
            }

            return(header);
        }
Exemplo n.º 2
0
 public bool Contains(cMessageCacheItems pItems) => (~mAttributes & pItems.Attributes) == 0 && HeaderFields.Contains(pItems.Names);