Skip to content

santisq/PSCompression

Repository files navigation

PSCompression

Zip and GZip utilities for PowerShell

build codecov PowerShell Gallery LICENSE

PSCompression is a PowerShell Module that provides Zip and Gzip utilities for compression, expansion and management. It also solves a few issues with Zip compression existing in built-in PowerShell.

What does this Module offer?

Zip Cmdlets

Cmdlet Description

Get-ZipEntry

Lists entries from specified zip archives. This cmdlet is the main entry point for the ZipEntry cmdlets in this module.

Expand-ZipEntry

Expands zip entries outputted by the Get-ZipEntry command to a destination directory.

Get-ZipEntryContent

Gets the content of one or more zip entries.

New-ZipEntry

Creates zip entries from specified path or paths.

Remove-ZipEntry

Removes zip entries from one or more zip archives.

Rename-ZipEntry

Renames zip entries from one or more zip archives.

Set-ZipEntryContent

Sets or appends content to a zip entry.

Compress-ZipArchive

Similar capabilities as Compress-Archive and overcomes a few issues with the built-in cmdlet (2 GB limit and more).

Gzip Cmdlets

Cmdlet Description

Compress-GzipArchive

Can compress one or more specified file paths into a Gzip file.

ConvertFrom-GzipString

Expands Gzip Base64 input strings.

ConvertTo-GzipString

Can compress input strings into Gzip Base64 strings or raw bytes.

Expand-GzipArchive

Expands Gzip compressed files to a destination path or to the success stream.

Documentation

Check out the docs for information about how to use this Module.

Installation

Gallery

The module is available through the PowerShell Gallery:

Install-Module PSCompression -Scope CurrentUser

Source

git clone 'https://github.com/santisq/PSCompression.git'
Set-Location ./PSCompression
./build.ps1

Requirements

This module has no external requirements and is compatible with Windows PowerShell 5.1 and PowerShell 7+.

Contributing

Contributions are more than welcome, if you wish to contribute, fork this repository and submit a pull request with the changes.