This one is one of the coolest newest cmdlets available in PowerShell V5 because engineers do not have to maintain 3rd party software like 7zip. This can be useful in situations if you get a lot files via ftp or logs files that can be archive at the end of the day or the end of the job. You can also pass as parameter what kind of compression you want to get. The following values are available for this
- FastestUse – This will pretty much would archive the files together with next to none compression. This options is useful when you have have bunch of small files.
- NoCompression – Like the name indicates it will not compress the files at all
- Optimal – It will try to compress as much as as it can and it is the default value
Now let me give you some examples on how long it takes and the level of compression
- 10 text files approx 10KB size file
- FastestUSE – Time around 42 milliseconds -Compression to 10KB
- NoCompression – Time around 53 milliseconds -Compression None
- Optimal -Time around 60 milliseconds -Compression to 9KB
- 10 text Files approx 10MB file
- FastestUSE – Time around 1.8 seconds -Compression to 2069KB
- NoCompression – Time around 2 seconds -Compression none
- Optimal -Time around 2.3 milliseconds -Compression to 750KB
- 10 text Files approx 100MB each file
- FastestUSE – Time around 16 seconds -Compression to 22,730 KB
- NoCompression – Time around 20 seconds -Compression none
- Optimal -Time around 24 seconds -Compression to 7,731KB