DepotDownloader: switch to DownloadFileToStream for grabbing Steam2 content to reduce memory usage.

pull/8/head
Nicholas Hastings 13 years ago
parent 5cab5b857e
commit 7676ff1cef

@ -984,9 +984,11 @@ namespace DepotDownloader
float perc = ( ( float )x / ( float )depot.NodesToDownload.Count ) * 100.0f; float perc = ( ( float )x / ( float )depot.NodesToDownload.Count ) * 100.0f;
Console.WriteLine("{0,6:#00.00}%\t{1}", perc, downloadPath); Console.WriteLine("{0,6:#00.00}%\t{1}", perc, downloadPath);
var file = session.DownloadFile( dirEntry, ContentServerClient.StorageSession.DownloadPriority.High, depot.cryptKey ); using (var fs = new FileStream(downloadPath, FileMode.Create))
File.WriteAllBytes( downloadPath, file ); {
session.DownloadFileToStream(dirEntry, fs, ContentServerClient.StorageSession.DownloadPriority.High, depot.cryptKey);
}
} }
} }
csClient.Disconnect(); csClient.Disconnect();

Loading…
Cancel
Save