I'm using Azure Functions(v2) and blob storage. I want to generate a zip from many blob files.
The blob file is large and large in size so as to reach the Threshold memory of Functions.
I use System.IO.Compression.ZipArchive and I referred to How to zip huge files in a blob using stream
using (var blobStream = await archiveBlob.OpenWriteAsync())
using (var resultArchive = new ZipArchive(blobStream, ZipArchiveMode.Create, true))
....
But next, I reached Threashold 5 minutes. So I try to split the function and gradually add files to Zip, but exception occurred at ZipArchive.
using (var resultArchive = new ZipArchive(blobStream, ZipArchiveMode.Update, true))
--> Microsoft.Azure.WebJobs.FunctionFailedException
"Update mode requires a stream with read, write, and seek capabilities."
- Can BlockBlob be opened with read and write capability?
- Or have other ideas?
thanks.