예제 #1
0
        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),
            });
        }