Exemple #1
0
 private static void DoCacheBlockUnpack(FileInfo source, DirectoryInfo target, bool allowMixing)
 {
     using (var stream = File.OpenRead(source.FullName)) {
         var reader = new CacheBlockReader(stream);
         reader.UnpackAll(target.FullName);
     }
 }
Exemple #2
0
 private static void DoCacheBlockList(FileInfo source)
 {
     using (var stream = File.OpenRead(source.FullName)) {
         var reader = new CacheBlockReader(stream);
         Console.WriteLine($"File entries: {reader.FileEntries.Length}");
         Console.WriteLine($"Base offset: {reader.BaseOffset}");
         var i = 0;
         foreach (var item in reader.FileEntries)
         {
             Console.WriteLine($"[{i}] {item.InternalName}: {item.Size} byte(s) at {item.RelativeOffset + reader.BaseOffset}");
             i++;
         }
     }
 }