Skip to content

Lists zip file content on Azure Blob service without downloading whole document. Supports both zip and zip64 files.

License

Notifications You must be signed in to change notification settings

hkutluay/ZipContent.Azure

Repository files navigation

ZipContent.Azure

build & test

Lists zip file content on Azure Blob service without downloading whole document. Supports both zip and zip64 files.

Usage

First install ZipContent.Azure via NuGet console:

PM> Install-Package ZipContent.Azure

Sample usage:

string containerName = "test";
string fileName = "foo.zip";

var connectionString = "DefaultEndpointsProtocol=https;AccountName=accountname;AccountKey=/zzzz;EndpointSuffix=core.windows.net";
BlobServiceClient blobServiceClient = new BlobServiceClient(connectionString);

// Get container client object
BlobContainerClient containerClient = blobServiceClient.GetBlobContainerClient(containerName);

// Get a reference to a blob
BlobClient blobClient = containerClient.GetBlobClient(fileName);

IPartialFileReader partialReader = new AzurePartialFileReader(blobClient);

IZipContentLister lister = new ZipContentLister(partialReader);

var contentList = await lister.GetContents();

foreach (var content in contentList)
   Console.WriteLine(item.FullName);

About

Lists zip file content on Azure Blob service without downloading whole document. Supports both zip and zip64 files.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages