Azure Blob storage: DownloadToByteArray VS DownloadToStream
Azure Blob storage: DownloadToByteArray VS DownloadToStream
Azure Blob storage: DownloadToByteArray VS DownloadToStream
Re: Azure Blob storage: DownloadToByteArray VS DownloadToStream
The benefit of Stream is that you can deal with bits piece-by-piece as they are downloaded rather than building up a big byte[] and then operating on the full thing. Your use of Stream isn't really getting the benefits since you are writing to a file and then reading that full file into memory. A good use of the stream API would be to pipe the download stream directly to the request's response stream as shown in the answer here [Downloading Azure Blob files in MVC3](https://stackoverflow.com/questions/6752000/downloading-azure-blob-files-in-mvc3)