예제 #1
0
 public static byte[] GetMpqFile(MpqArchive archive, string fileName)
 {
     using (var mpqStream = archive.OpenFile(archive.Single(i => i.Filename == fileName)))
     {
         var buffer = new byte[mpqStream.Length];
         mpqStream.Read(buffer, 0, buffer.Length);
         return(buffer);
     }
 }
예제 #2
0
 private static byte[] GetMpqArchiveFileBytes(MpqArchive archive, string fileName)
 {
     using (var mpqStream = archive.OpenFile(archive.Single(i => i.Filename == fileName)))
     {
         var buffer = new byte[mpqStream.Length];
         mpqStream.Read(buffer, 0, buffer.Length);
         return buffer;
     }
 }