Ejemplo n.º 1
0
 public WindowReader(Stream patch, Header header)
 {
     this.header = header;
     vcdReader = new VcdReader(patch);
     lastWindowLength = 0;
     lastWindowOffset = 0;
 }
Ejemplo n.º 2
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;
        }