{"id":26175686,"url":"https://github.com/itn3000/dotnet-compressor","last_synced_at":"2025-04-14T21:34:45.650Z","repository":{"id":36467128,"uuid":"195015005","full_name":"itn3000/dotnet-compressor","owner":"itn3000","description":"compression utility(zip, tar, gz, bzip2,...)","archived":false,"fork":false,"pushed_at":"2024-09-03T21:00:08.000Z","size":138,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T12:59:09.679Z","etag":null,"topics":["dotnet","extracting-files","gzip","tar","zip"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itn3000.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-07-03T08:46:37.000Z","updated_at":"2022-04-08T08:58:58.000Z","dependencies_parsed_at":"2023-11-22T07:28:04.067Z","dependency_job_id":"955d83fe-a847-4a0d-9cb3-a5fbc6607d40","html_url":"https://github.com/itn3000/dotnet-compressor","commit_stats":{"total_commits":120,"total_committers":3,"mean_commits":40.0,"dds":0.07499999999999996,"last_synced_commit":"a9fbb3f924c16829091c8f0b0a6708950708fd49"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itn3000%2Fdotnet-compressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itn3000%2Fdotnet-compressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itn3000%2Fdotnet-compressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itn3000%2Fdotnet-compressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itn3000","download_url":"https://codeload.github.com/itn3000/dotnet-compressor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695480,"owners_count":21146956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","extracting-files","gzip","tar","zip"],"created_at":"2025-03-11T20:57:25.379Z","updated_at":"2025-04-14T21:34:45.619Z","avatar_url":"https://github.com/itn3000.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Single binary compression tool\n\nThis is the tool for compressing, archiving.\n\n# Features\n\n* supporting following formats\n    * container\n        * [ZIP(encryption is OK)](https://tools.ietf.org/html/rfc1950)\n        * [TAR](https://www.freebsd.org/cgi/man.cgi?query=tar\u0026sektion=5\u0026manpath=FreeBSD+8-current)\n    * compression\n        * [GZIP](https://tools.ietf.org/html/rfc1952)\n        * [BZIP2](http://www.bzip.org/)\n        * [LZIP](https://www.nongnu.org/lzip/)\n        * [XZ(decompression only)](https://tukaani.org/xz/)\n* you can use as single binary executable(powered by [corert](https://github.com/dotnet/corert))\n    * linux-x64,macos-x64 and windows-x64 are supported\n* you can use as [dotnet global tool](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools)\n\n# Known limitation\n\n* XZ is decompression only\n* File attributes in archive is not preserved\n* Format is not detected by automatic\n* Symblic link not supported\n\n# Usage\n\n## Getting Binary\n\n### Single Binary\n\nyou can get binary from [github release page](https://github.com/itn3000/dotnet-compressor/releases).\nOnce you download it and add executable permission, you can execute it.\n\n### dotnet global tool\n\nif you want to use as dotnet global tool, do following steps.\n\n1. install [dotnet sdk](https://dotnet.microsoft.com/download) 5.0 or later\n2. run `dotnet tool install -g dotnet-compressor`\n3. ensure `$HOME/.dotnet/tools` to your PATH\n\n## Basic\n\nthe command's basic format is `dcomp [kind] [verb(d or c)] [options]`.\nyou can get kind list by `dcomp --help`,\nverb is `c(compression)` or `d(decompression)`.\nand you can get individual subcommand help is `dcomp [kind] [verb] --help`\n\n## ZIP\n\nyou can manupilate ZIP by `zip` subcommand.\n\n### Basic Usage\n\n* archiving files under `dir1` and output `dir1.zip`: `dcomp zip c -b dir1 -o dir1.zip`.\n* extracting `dir1.zip` into `dir1`: `dcomp zip d -i dir1.zip -o dir1`\n\n### File globbing\n\n* archiving files under `dir1` which has `.txt` extension: `dcomp zip c -b dir1 -i '**/*.txt' -o dir1.zip`\n* extracting files from `dir1.zip` which has `.txt` extension to `dir1`: `dcomp zip d -i dir1.zip --include '**/*.txt' -o dir1`\n\n### Converting filename encoding \n\n* archiving files and convert filename to Shift-JIS: `dcomp zip c -e sjis -b dir1 -o dir1.zip`\n* extracting `dir1.zip` and filename decoding as Shift-JIS: `dcomp zip d -e sjis -i dir1.zip -o dir1`\n\n### Password encryption\n\n* archiving files and encrypting with password `abc`: `dcomp zip c -b dir1 -o dir1.zip -p abc`\n* archiving files and decrypting with password `abc`: `dcomp zip d -i dir1.zip -o dir1 -p abc`\n\n## TAR\n\n### Basic Usage\n\n* archiving files under `dir1` and output `dir1.tar`: `dcomp tar c -b dir1 -o dir1.tar`.\n* extracting `dir1.tar` into `dir1`: `dcomp tar d -i dir1.tar -o dir1`\n\n### STDIO\n\n* archiving files under `dir1` and output to standard output: `dcomp tar c -b dir1 \u003e dir1.tar`\n* extracting data from standard input into `dir1`: `cat dir1.tar | dcomp tar d -o dir1`\n\n### File globbing\n\n* archiving files under `dir1` which has `.txt` extension: `dcomp tar c -b dir1 -i '**/*.txt' -o dir1.tar`\n* extracting files from `dir1.tar` which has `.txt` extension to `dir1`: `dcomp tar d -i '**/*.txt' -o dir1`\n\n### Converting filename encoding \n\n* archiving files and convert filename to Shift-JIS: `dcomp tar c -e sjis -b dir1 -o dir1.tar`\n* extracting `dir1.tar` and filename decoding as Shift-JIS: `dcomp tar d -e sjis -i dir1.tar -o dir1`\n\n### set file permission(since 1.1.0)\n\n* set file permission '0755' for files which have '*.sh' extension: `dcomp tar c -b dir1 -o dir1.tar -pm \".*\\.sh=755\"`\n\n## GZIP\n\n### Basic Usage\n\n* compress `test.txt` and output to `test.gz`: `dcomp gz c -i test.txt -o test.gz`\n* decompress `test.gz` and output to `test.txt`: `dcomp gz d -i test.gz -o test.txt`\n\n## BZ2\n\n### Basic Usage\n\n* compress `test.txt` and output to `test.bz2`: `dcomp bz2 c -i test.txt -o test.bz2`\n* decompress `test.bz2` and output to `test.txt`: `dcomp bz2 d -i test.bz2 -o test.txt`\n\n## LZIP\n\n### Basic Usage\n\n* compress `test.txt` and output to `test.lz`: `dcomp lzip c -i test.txt -o test.lz`\n* decompress `test.lz` and output to `test.txt`: `dcomp lzip d -i test.bz2 -o test.txt`\n\n## XZ\n\n### Basic Usage\n\n* extracting `test.xz` and output to `test.txt`: `dcomp xz d -i test.xz -o test.txt`\n\n## GZIP+TAR\n\n* archiving files under `dir1` and compressing by gzip: `dcomp tar c -b dir1 | dcomp gz c -o dir1.tgz`\n* extracting from `dir1.tgz` into `dir1`: `dcomp gz d -i dir1.tgz|dcomp tar d -o dir1`\n\n## ZStandard\n\n### Basic Usage\n\n* compressing `test.txt` and output to `test.zstd`: `dcomp zstd c -i test.txt -o test.zstd`\n* decompressing `test.zstd` and output to `test.txt`: `dcomp zstd d -i test.zstd -o test.txt`\n\n# How to build\n\n## Prerequisits\n\n* dotnet-sdk 5.0\n* mono(if linux or mac)\n* .NET Framework 4.6.1 or later(if windows)\n\nhere are prerequisits if you want to build native binary\n\n* windows\n    * Build tools for Visual Studio 2019(if windows)\n* ubuntu\n    * build-essential\n    * libkrb5-dev\n    * zlib1g-dev\n    * clang\n* mac\n    * xcode\n\n## Build \n\n1. run `dotnet tool restore`\n2. run `dotnet tool run dotnet-cake`\n    * if you want to build release binary, run `dotnet tool run dotnet-cake -Configuration=Release -IsRelease`\n\nand then you will get nupkg in `dist/[Configuration]/nupkg`, binary executable in `bin/Release/netcoreapp3.1`\n\n## Build native binary\n\nif you want to get single executable binary,\nyou should do following steps.\n\n1. set `CppCompilerAndLinker=clang-[version]` env value if you do not have clang-3.9 and build in linux or macos.\n2. run `dotnet tool run dotnet-cake -Target=Native -Runtime=[rid] -Configuration=[Debug or Release]`\n\n[about rid, refer to this page](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)\n\nand then you will get native executable binary in `dist/[Configuration]/bin`\n\n## Generating sln\n\nsln is not existed in repo.if you want to solution file(*.sln), you should do following steps.\n\n1. run `dotnet tool run dotnet-cake -Target=SlnGen`\n\nand then you will get `dotnet-compressor.sln` file in top of the repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitn3000%2Fdotnet-compressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitn3000%2Fdotnet-compressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitn3000%2Fdotnet-compressor/lists"}