コード例 #1
0
ファイル: FSTree.cs プロジェクト: leecloudvictor/PS4_Tools
        public FSFile(PfsBuilder b)
        {
            var pfsc = new PFSCWriter(b.CalculatePfsSize());

            Write = s =>
            {
                pfsc.WritePFSCHeader(s);
                b.WriteImage(new OffsetStream(s, s.Position));
            };
            _compressedSize = b.CalculatePfsSize();
            Size            = _compressedSize + pfsc.HeaderSize;
            name            = "pfs_image.dat";
            Compress        = true;
        }
コード例 #2
0
        public static PfsProperties MakeOuterPFSProps(PKG.PkgProperties props, PfsBuilder innerPFS, byte[] EKPFS, bool encrypt = true)
        {
            var root = new FSDir();

            root.Files.Add(new FSFile(innerPFS)
            {
                Parent = root,
            });
            return(new PfsProperties()
            {
                root = root,
                BlockSize = 0x10000,
                Encrypt = encrypt,
                Sign = true,
                EKPFS = EKPFS,
                Seed = new byte[16],
                FileTime = GetTimeStamp(props),
            });
        }