diff --git a/README.md b/README.md index e1c42f10379ac38ed06dfa23b7807eb84ff0d84a..6ecf0a469b31435d05f4f76d9bcd3721dbd31da0 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,21 @@ The allows to zip a folder and/or upload a whole stream in chunks to a S3 object For example: ``` -var zipUtilities = new ZipUtilities(_s3MultipartStreamConfiguration); +// uploading +var zipUtilities = new ZipUtilities(s3MultipartStreamConfiguration); zipUtilities.ZipAndUploadFolder(@"c:\temp\test", "test.zip"); ``` +``` +// downloading +var zipUtilities = new ZipUtilities(_s3MultipartStreamConfiguration); +using (var s3MultipartDownloadStream = new S3MultipartDownloadStream(key, s3MultipartStreamConfiguration)) +{ + using (var archive = new ZipArchive(s3MultipartDownloadStream, ZipArchiveMode.Read, true)) + { + zipUtilities.UnzipToFolder(archive, @"c:\temp\test2\"); + } +} +``` + A zip file of the folder will be in S3 under the key test.zip. \ No newline at end of file