Example #1
0
 public PredictionHeader(Header header, PredictionCacheCustomHeader customHeader, Prediction.Entry[] lookupTable)
     : base(header.Identifier, header.SchemaVersion, header.DataVersion, header.Source,
            header.CreationTimeTicks, header.Assembly)
 {
     Custom      = customHeader;
     LookupTable = lookupTable;
 }
Example #2
0
        public static PredictionHeader Read(Stream stream, BlockStream blockStream)
        {
            Header baseHeader;
            PredictionCacheCustomHeader customHeader;

            Prediction.Entry[] lookupTable;

            using (var reader = new BinaryReader(stream, Encoding.Default, true))
            {
                baseHeader   = Read(reader);
                customHeader = PredictionCacheCustomHeader.Read(reader);
            }

            using (var reader = new ExtendedBinaryReader(blockStream, Encoding.Default, true))
            {
                lookupTable = ReadLookupTable(reader);
            }

            return(new PredictionHeader(baseHeader, customHeader, lookupTable));
        }