Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System;
using System.Net.Http;
using System.IO;
using System.IO.Compression;
namespace testzip
{
class MainClass
{
public static void Main (string[] args)
{
var sqliteUri="https://www.sqlite.org/2015/sqlite-dll-win32-x86-3080900.zip";
using(var client = new HttpClient())
using(var archiveStream = client.GetStreamAsync(sqliteUri).Result)
using (var archive = new ZipArchive(archiveStream)) //InvalidDataException thrown here
{
//do something with zip archive
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment