protected override void ReadChunk()
        {
            var start = this.Reader.BaseStream.Position;

            IndexCommand = (IndexCommandKind)this.Reader.ReadByte();
            IsSynonym    = this.Reader.ReadBoolean();
            this.Reader.ReadByte(); // Alignment

            TargetFile = new SqpackIndexFile(this.Reader);

            FileHash = this.Reader.ReadUInt64BE();

            BlockOffset = this.Reader.ReadUInt32BE();
            BlockNumber = this.Reader.ReadUInt32BE();

            this.Reader.ReadBytes(Size - (int)(this.Reader.BaseStream.Position - start));
        }
Example #2
0
        protected override void ReadChunk()
        {
            var start = reader.BaseStream.Position;

            FileKind   = (TargetFileKind)reader.ReadByte();
            HeaderKind = (TargetHeaderKind)reader.ReadByte();
            reader.ReadByte(); // Alignment

            if (FileKind == TargetFileKind.Dat)
            {
                TargetFile = new SqpackDatFile(reader);
            }
            else
            {
                TargetFile = new SqpackIndexFile(reader);
            }

            HeaderData = reader.ReadBytes(HEADER_SIZE);

            reader.ReadBytes(Size - (int)(reader.BaseStream.Position - start));
        }