Updating compressed archives

For a long time, we have been zipping files and folders using various approaches in Power Shell that range from the 7zip libraries to using System. There is definitely nothing wrong with either of these approaches, but wouldn't be nicer if we have a cmdlet that is already available to us to use to zip the files and folders vs.

File System or the Power Shell Community Extensions to accomplish this task.

This grows, at least, by two (1 incremental packfile and its index) every time with update a repository.

For a fresh fetch of our current ~16M repositories, that adds up to 80M files and 32M more for each update.

Neither GCS or HDFS are low-latency systems, so the latency of each file fetch from the distributed file system dominates the time to fetch a repository to a computing node.

First thing that we need to do is to create a folder to store those files. Our files have been extracted from the zip archive and are now awaiting our review.

He also has a number of open source projects available on Codeplex and Git Hub.

I have a large archive with files that I need to edit, but I don't want to extract / zip every time.

building your own functions from scratch to do this? With Power Shell V5, we now have two new cmdlets which finally bring us the zipping that we have been waiting for! Let's start out by looking at the Compress-Archive cmdlet so we can begin zipping up some items.

The new cmdlets are called Compress-Archive and Expand-Archive, both part of the Microsoft. Looking at the command syntax we can see a few interesting things such as being able to set the Compression Level of the zip archive and then using –Update to add items to an existing zip archive.

Leave a Reply