コード例 #1
0
ファイル: PakEntry.cs プロジェクト: uawha/ToM_UE_Pak_4_22
        public PakEntry(UE_Reader reader, PakIndex index)
        {
            Index    = index;
            Filename = reader.ReadString();
            long start_position = reader.BaseStream.Position;

            Position = reader.ReadInt64();
            if (Position < 0)
            {
                reader.BaseStream.Position += 0x2A;
                HeaderSize = reader.BaseStream.Position - start_position;
                return;
            }
            Size                    = reader.ReadInt64();
            UncompressedSize        = reader.ReadInt64();
            CompressionMethodIndex  = reader.ReadByte();
            Hash                    = reader.ReadBytes(20);
            PakCompressedBlockCount = reader.ReadInt32();
            Blocks                  = new PakCompressedBlock[PakCompressedBlockCount];
            for (int i = 0; i < Blocks.Length; i++)
            {
                Blocks[i] = new PakCompressedBlock(reader);
            }
            Encrypted = reader.ReadByte() > 0; // need UE Viewer source reference
            if (PakCompressedBlockCount > 0)
            {
                CompressionBlockSize = reader.ReadInt32();
            }
            HeaderSize = reader.BaseStream.Position - start_position;
        }
コード例 #2
0
ファイル: PakFile.cs プロジェクト: uawha/ToM_UE_Pak_4_22
 public PakFile(UE_Reader reader)
 {
     reader.BaseStream.Position = reader.BaseStream.Length - 189;
     Info = new PakInfo(reader, this);
     reader.BaseStream.Position = Info.IndexOffset;
     Index = new PakIndex(reader, this);
 }