https://github.com/wieslawsoltes/dotnetcompress
An .NET compression tool. Supported file formats are Brotli and GZip.
https://github.com/wieslawsoltes/dotnetcompress
brotli ci command-line-tool compression compressor dotnet gzip wasm web webassembly
Last synced: 2 months ago
JSON representation
An .NET compression tool. Supported file formats are Brotli and GZip.
- Host: GitHub
- URL: https://github.com/wieslawsoltes/dotnetcompress
- Owner: wieslawsoltes
- License: mit
- Created: 2022-10-20T12:24:45.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-06T13:39:01.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T22:05:28.598Z (over 1 year ago)
- Topics: brotli, ci, command-line-tool, compression, compressor, dotnet, gzip, wasm, web, webassembly
- Language: C#
- Homepage:
- Size: 51.8 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# DotNetCompress
[](https://www.nuget.org/packages/DotNetCompress)
[](https://www.nuget.org/packages/DotNetCompress)[](https://github.com/wieslawsoltes/DotNetCompress)
[](https://github.com/wieslawsoltes/DotNetCompress)
[](https://github.com/wieslawsoltes/DotNetCompress)An .NET compression tool. Supported file formats are Brotli and GZip.
# Usage
### Install
```
dotnet tool install --global DotNetCompress --version 4.0.0
```### Uninstall
```
dotnet tool uninstall -g DotNetCompress
```### Command-line help
```
DotNetCompress:
An .NET compression tool.Usage:
DotNetCompress [options]Options:
-f, --inputFiles The relative or absolute path to the input files
-d, --inputDirectory The relative or absolute path to the input directory
-o, --outputDirectory The relative or absolute path to the output directory
--outputFiles The relative or absolute path to the output files
-p, --pattern The search string to match against the names of files in the input directory
--format The compression file format (br, gz)
-l, --level The compression level (Optimal, Fastest, NoCompression, SmallestSize)
-t, --threads The number of parallel job threads
-r, --recursive Recurse into subdirectories of input directory search
--quiet Set verbosity level to quiet
--version Show version information
-?, -h, --help Show help and usage information
```### Brotli example
```
dotnetcompress -d /publish/files/path -p "*.dll" --format br -l Optimal
dotnetcompress -d /publish/files/path -p "*.wasm" --format br -l Optimal
dotnetcompress -d /publish/files/path -p "*.js" --format br -l Optimal
dotnetcompress -d /publish/files/path -p "*.dll" -p "*.js" -p "*.wasm" --format br -l Optimal
```### GZip example
```
dotnetcompress -d /publish/files/path -p "*.dll" --format gz -l Optimal
dotnetcompress -d /publish/files/path -p "*.wasm" --format gz -l Optimal
dotnetcompress -d /publish/files/path -p "*.js" --format gz -l Optimal
dotnetcompress -d /publish/files/path -p "*.dll" -p "*.js" -p "*.wasm" --format gz -l Optimal
```## License
DotNetCompress is licensed under the [MIT license](LICENSE.md).