Ejemplo n.º 1
0
 /// <summary>Creates and loads a WZ file from a path. The Stream created will be disposed when the WZ file is disposed.</summary>
 /// <param name="path"> The path where the WZ file is located. </param>
 /// <param name="variant"> The variant of this WZ file. </param>
 /// <param name="encrypted"> Whether the WZ file is encrypted outside a WZ image. </param>
 /// <param name="flag"> WZ parsing flags. </param>
 public unsafe WZFile(string path, WZVariant variant, bool encrypted, WZReadSelection flag = WZReadSelection.None)
 {
     _variant   = variant;
     _encrypted = encrypted;
     _flag      = flag;
     _aes       = new WZAES(_variant);
     _bpo       = new MemoryMappedFile(path);
     _r         = new WZBinaryReader(_bpo.Pointer, _bpo.Length, _aes, 0);
     Parse();
 }
Ejemplo n.º 2
0
 internal unsafe WZBinaryReader(byte *start, long size, WZAES aes, uint versionHash) : base(start, size)
 {
     _aes        = aes;
     VersionHash = versionHash;
 }