Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

249
Visualizações
DotNetZip doesn't read all entries from zip stored at azure blob storage

I have a zip stored in azure blob storage which I'm streaming it locally and iterating its entries.

I'm getting the stream like that:

BlobClient blob = _blobServiceClientProp.GetBlobContainerClient(blobExtractionSource.ContainerName)
                                        .GetBlobClient(blobExtractionSource.BlobName);
            
Stream zipStream = await blob.OpenReadAsync().ConfigureAwait(false);

The stream length is valid (8890655642 bytes).

Using DotNetZip 1.16, I'm reading from the zip stream:

ZipFile zipFile = ZipFile.Read(zipStream);

The problem is that I'm getting wrong number of entries. According to DotNetZip, I have 41082 entries in the zip which is wrong. I checked the number of entries both by the Entries property (zipFile.Entries) and also by iterating and count them manually.

If I switch to IO.Compression.ZipArchive and iterating the zip entries, IO.Compression.ZipArchive is telling me I have 85,413 entries in the zip, which is the right number of entries.

Any suggestions how can I still work with DotNetZip and make it get the right number of entries?

Note that when reading from the same zip locally (after I manually download it) with same version of DotNetZip, I successfully get all the entries.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Through ZipArchive we could able to pull off the exact number. Below is the code that worked for us.

var stream = await blobClient.OpenReadAsync();
using ZipArchive zip = new ZipArchive(stream, ZipArchiveMode.Read);
Console.WriteLine(zip.Entries.Count);
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda