コード例 #1
0
 public PkgFile(string pkgIn, uint fnumberIn)
 {
     this.Fnumber = fnumberIn;
     this.Pkg     = pkgIn;
     this.GetPkgStream();
     this.GetFilename(this.Fnumber);
     this.Filehash = Helpers.InvertUint32(Calculation.GetHash(this.Filename));
     this.StartProcess();
 }
コード例 #2
0
 public PkgFile(string filenameIn)
 {
     this.Filehash = Calculation.GetHash(filenameIn);
     this.Fnumber  = Calculation.CalcFilenumber(this.Filehash);
     this.GetPkgFile(this.Filehash);
     this.GetPkgStream();
     this.GetFilename(this.Fnumber);
     this.StartProcess();
 }
コード例 #3
0
 public void Test(uint fnumber)
 {
     this.Fnumber = fnumber;
     this.GetFilename(fnumber);
     this.Filehash    = Helpers.InvertUint32(Calculation.GetHash(this.Filename));
     this.PkgEntry    = this._pkgStream.PkgEntryList[(int)fnumber];
     this.PkgFileType = FileClassification.SetD2Filetype(this.PkgEntry);
     this.GetBlockEntries();
 }
コード例 #4
0
 public PkgFile(PkgStream pkgStream, uint fnumber)
 {
     this.Fnumber    = fnumber;
     this._pkgStream = pkgStream;
     this.GetPkgFile();
     this.GetFilename(fnumber);
     this.Filehash    = Helpers.InvertUint32(Calculation.GetHash(this.Filename));
     this.PkgEntry    = this._pkgStream.PkgEntryList[(int)fnumber];
     this.Nonce       = pkgStream.Nonce;
     this.PackageId   = pkgStream.Header.PackageId;
     this.LangId      = pkgStream.Header.LangId;
     this.PkgFileType = FileClassification.SetD2Filetype(this.PkgEntry);
     this.GetBlockEntries();
 }
コード例 #5
0
 public static PkgFile File2Hash(string filename)
 {
     return(new PkgFile(Calculation.GetHash(filename)));
 }