{"id":43783430,"url":"https://github.com/gios/gzipper","last_synced_at":"2026-02-05T18:39:44.329Z","repository":{"id":26350672,"uuid":"108446646","full_name":"gios/gzipper","owner":"gios","description":"CLI for compressing files.","archived":false,"fork":false,"pushed_at":"2025-03-16T16:14:13.000Z","size":91229,"stargazers_count":71,"open_issues_count":4,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-11T01:45:37.549Z","etag":null,"topics":["algorithm","brotli","cli","compression","deflate","gzip","nodejs","zlib"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gzipper","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gios.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://www.paypal.com/donate/?hosted_button_id=SJUJDMS6XQACA"]}},"created_at":"2017-10-26T17:54:04.000Z","updated_at":"2025-10-03T18:12:41.000Z","dependencies_parsed_at":"2024-06-18T15:16:52.087Z","dependency_job_id":"a5d685af-8683-4231-9549-efecb1e66d2f","html_url":"https://github.com/gios/gzipper","commit_stats":{"total_commits":485,"total_committers":9,"mean_commits":"53.888888888888886","dds":0.08041237113402067,"last_synced_commit":"d54f17602d833a2d68c51deb8a4802a57cea3087"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/gios/gzipper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gios%2Fgzipper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gios%2Fgzipper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gios%2Fgzipper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gios%2Fgzipper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gios","download_url":"https://codeload.github.com/gios/gzipper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gios%2Fgzipper/sbom","scorecard":{"id":427474,"data":{"date":"2025-08-11","repo":{"name":"github.com/gios/gzipper","commit":"14cc45d096bf96f90658e25ca64c29344d3da21d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yaml:1","Warn: no topLevel permission defined: .github/workflows/publish.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/gios/gzipper/build.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gios/gzipper/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/gios/gzipper/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yaml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/gios/gzipper/publish.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yaml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/gios/gzipper/publish.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yaml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/gios/gzipper/publish.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/gios/gzipper/publish.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/gios/gzipper/publish.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yaml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/gios/gzipper/publish.yaml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Warn: could not determine whether codeowners review is allowed","Warn: no status checks found to merge onto branch 'main'","Warn: PRs are not required to make changes on branch 'main'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T02:32:29.229Z","repository_id":26350672,"created_at":"2025-08-19T02:32:29.234Z","updated_at":"2025-08-19T02:32:29.234Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29128806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T18:31:02.507Z","status":"ssl_error","status_checked_at":"2026-02-05T18:29:43.962Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["algorithm","brotli","cli","compression","deflate","gzip","nodejs","zlib"],"created_at":"2026-02-05T18:39:43.497Z","updated_at":"2026-02-05T18:39:44.320Z","avatar_url":"https://github.com/gios.png","language":"TypeScript","readme":"# Gzipper\n\n[![Support Ukraine Badge](https://bit.ly/support-ukraine-now)](https://github.com/support-ukraine/support-ukraine)\n[![Build Status](https://github.com/gios/gzipper/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/gios/gzipper/actions)\n[![npm version](https://badge.fury.io/js/gzipper.svg)](https://badge.fury.io/js/gzipper)\n\nA tool for compressing files by means of\n[Deflate](https://wikiless.org/wiki/DEFLATE),\n[Brotli](https://wikiless.org/wiki/Brotli),\n[gzip](https://wikiless.org/wiki/Gzip),\n[Zopfli](https://wikiless.org/wiki/Zopfli) and\n[zstd](https://wikiless.org/wiki/Zstd) algorithms,\nworks seamlessly with many CLI UI tools (Angular CLI, Vue CLI, create-react-app).\n\nThe flexibility of the algorithms could be extended by many options,\nincluding the [`--gzip-level`](#--gzip-level-number),\n[`--gzip-strategy`](#--gzip-strategy-number),\n[`--gzip-memory-level`](#--gzip-memory-level-number),\n[`--brotli-param-mode`](#--brotli-param-mode-value),\n[`--brotli-quality`](#--brotli-quality-number),\n[`--brotli-size-hint`](#--brotli-size-hint-number).\nAll options can be declared via ENV variables (ENV variables have higher priority over CLI arguments).\n\nYou can enable [`--verbose`](#-v---verbose) mode for better visual representation,\ncustomize your file output using [`--output-file-format`](#--output-file-format-value)\nor compress with [`--incremental`](#--incremental) option if you have a lot of files that rarely change.\n\nBy default `gzipper` compress **all the files** but you could use\n[`--include`](#-i---include-extensions) or [`--exclude`](#-e---exclude-extensions) options for flexibility.\n\n- [Gzipper](#gzipper)\n  - [Install](#install)\n  - [Usage](#usage)\n    - [`gzipper`](#gzipper-1)\n    - [`compress|c`](#compressc)\n    - [`cache`](#cache)\n  - [Examples](#examples)\n    - [CLI](#cli)\n    - [Node.js Module](#nodejs-module)\n  - [Options](#options)\n    - [`compress|c`](#compressc-1)\n      - [`--incremental`](#--incremental)\n      - [`-v`, `--verbose`](#-v---verbose)\n      - [`-e`, `--exclude \u003cextensions\u003e`](#-e---exclude-extensions)\n      - [`-i`, `--include \u003cextensions\u003e`](#-i---include-extensions)\n      - [`-t`, `--threshold \u003cnumber\u003e`](#-t---threshold-number)\n      - [`--gzip`](#--gzip)\n      - [`--deflate`](#--deflate)\n      - [`--brotli`](#--brotli)\n      - [`--zopfli`](#--zopfli)\n      - [`--zstd`](#--zstd)\n      - [`--gzip-level \u003cnumber\u003e`](#--gzip-level-number)\n      - [`--gzip-memory-level \u003cnumber\u003e`](#--gzip-memory-level-number)\n      - [`--gzip-strategy \u003cnumber\u003e`](#--gzip-strategy-number)\n      - [`--deflate-level \u003cnumber\u003e`](#--deflate-level-number)\n      - [`--deflate-memory-level \u003cnumber\u003e`](#--deflate-memory-level-number)\n      - [`--deflate-strategy \u003cnumber\u003e`](#--deflate-strategy-number)\n      - [`--brotli-param-mode \u003cvalue\u003e`](#--brotli-param-mode-value)\n      - [`--brotli-quality \u003cnumber\u003e`](#--brotli-quality-number)\n      - [`--brotli-size-hint \u003cnumber\u003e`](#--brotli-size-hint-number)\n      - [`--zopfli-num-iterations \u003cnumber\u003e`](#--zopfli-num-iterations-number)\n      - [`--zopfli-block-splitting`](#--zopfli-block-splitting)\n      - [`--zopfli-block-splitting-max \u003cnumber\u003e`](#--zopfli-block-splitting-max-number)\n      - [`--zstd-level \u003cnumber\u003e`](#--zstd-level-number)\n      - [`--output-file-format \u003cvalue\u003e`](#--output-file-format-value)\n      - [`--remove-larger`](#--remove-larger)\n      - [`--skip-compressed`](#--skip-compressed)\n      - [`--workers \u003cnumber\u003e`](#--workers-number)\n      - [`--no-color`](#--no-color)\n    - [`cache`](#cache-1)\n      - [`purge`](#purge)\n      - [`size`](#size)\n  - [Changelog](#changelog)\n  - [Contribution](#contribution)\n  - [Support](#support)\n  - [Prerequisites](#prerequisites)\n\n## Install\n\n- Globally\n\n  `npm i gzipper -g`\n\n- Locally to `devDependencies`.\n\n  `npm i gzipper -D`\n\n## Usage\n\n### `gzipper`\n\n```sh\nUsage: gzipper [options] [command]\n\nOptions:\n  -V, --version                             output the version number\n  -h, --help                                display help for command\n\nCommands:\n  compress|c [options] \u003cpath\u003e [outputPath]  compress selected path and optionally set output directory\n  cache                                     manipulations with cache\n  help [command]                            display help for command\n```\n\n### `compress|c`\n\n```sh\nUsage: gzipper compress|c [options] \u003cpath\u003e [outputPath]\n\ncompress selected path and optionally set output directory\n\nOptions:\n  -v, --verbose                          detailed level of logs\n  --incremental                          incremental compression\n  -e, --exclude \u003cextensions\u003e             exclude file extensions from compression, example: jpeg,jpg...\n  -i, --include \u003cextensions\u003e             include file extensions for compression, example: js,css,html...\n  -t, --threshold \u003cnumber\u003e               exclude assets smaller than this byte size. 0 (default)\n  --deflate                              enable deflate compression\n  --brotli                               enable brotli compression\n  --gzip                                 enable gzip compression\n  --zopfli                               enable zopfli compression\n  --zstd                                 enable zstd compression\n  --gzip-level \u003cnumber\u003e                  gzip compression level 6 (default), 0 (no compression) - 9 (best compression)\n  --gzip-memory-level \u003cnumber\u003e           amount of memory which will be allocated for gzip compression 8 (default), 1 (minimum memory) - 9 (maximum memory)\n  --gzip-strategy \u003cnumber\u003e               gzip compression strategy 0 (default), 1 (filtered), 2 (huffman only), 3 (RLE), 4 (fixed)\n  --deflate-level \u003cnumber\u003e               deflate compression level 6 (default), 0 (no compression) - 9 (best compression)\n  --deflate-memory-level \u003cnumber\u003e        amount of memory which will be allocated for deflate compression 8 (default), 1 (minimum memory) - 9 (maximum memory)\n  --deflate-strategy \u003cnumber\u003e            deflate compression strategy 0 (default), 1 (filtered), 2 (huffman only), 3 (RLE), 4 (fixed)\n  --brotli-param-mode \u003cvalue\u003e            default, text (for UTF-8 text), font (for WOFF 2.0 fonts)\n  --brotli-quality \u003cnumber\u003e              brotli compression quality 11 (default), 0 - 11\n  --brotli-size-hint \u003cnumber\u003e            expected input size 0 (default)\n  --zopfli-num-iterations \u003cnumber\u003e       maximum amount of times to rerun forward and backward pass to optimize LZ77 compression cost\n  --zopfli-block-splitting               splits the data in multiple deflate blocks with optimal choice for the block boundaries\n  --zopfli-block-splitting-max \u003cnumber\u003e  maximum amount of blocks to split into (0 for unlimited, but this can give extreme results that hurt compression on some files)\n  --zstd-level \u003cnumber\u003e                  zstd compression level 1 (default), 5 (best compression)\n  --output-file-format \u003cvalue\u003e           output file format with default artifacts [filename].[ext].[compressExt]\n  --remove-larger                        remove compressed files if they larger than uncompressed originals\n  --skip-compressed                      skip compressed files if they already exist\n  --workers \u003cnumber\u003e                     numbers of workers which will be spawned, system CPU cores count - 1 (default)\n  --no-color                             disable logger colorful messages\n  -h, --help                             display help for command\n```\n\n### `cache`\n\n```sh\nUsage: gzipper cache [options] [command]\n\nmanipulations with cache\n\nOptions:\n  -h, --help      display help for command\n\nCommands:\n  purge           purge cache storage\n  size            size of cached resources\n  help [command]  display help for command\n```\n\n## Examples\n\n### CLI\n\n- Globally usage\n\n  `gzipper compress [options] \u003cpath\u003e [outputPath]`\n\n- Locally usage\n\n  1. Add module to scripts in your package.json and run `compress` command `npm run compress`\n\n     ```json\n       \"scripts\": {\n         \"gzipper\": \"gzipper\",\n         \"compress\": \"gzipper compress ./src\"\n       }\n     ```\n\n  2. Use `npx` command\n\n     ```json\n       \"scripts\": {\n         \"compress\": \"npx gzipper compress ./src\"\n       }\n     ```\n\n- UI build tools (e.g. Angular CLI)\n\n  ```json\n    \"scripts\": {\n      \"build\": \"ng build \u0026\u0026 gzipper compress ./src\"\n    }\n  ```\n\n- Compress files to a certain directory `./dist` (folders structure inside `src` will be saved)\n\n  ```json\n    \"scripts\": {\n      \"compress\": \"gzipper compress ./src ./dist\"\n    }\n  ```\n\n- Compress files to very deep folder `./very/deep/folder/dist` (all folders will be automatically created if not exist)\n\n  ```json\n    \"scripts\": {\n      \"compress\": \"gzipper compress ./src ./very/deep/folder/dist\"\n    }\n  ```\n\n- Compress a single file\n\n  ```json\n    \"scripts\": {\n      \"compress\": \"gzipper compress ./src/awesomeness.txt\"\n    }\n  ```\n\n### Node.js Module\n\n```javascript\nimport { Compress } from \"gzipper\";\nconst gzip = new Compress('./src', './dist', {\n  verbose: true,\n  brotli: true,\n});\n\ntry {\n  const files = await gzip.run();\n  console.info('Compressed files: ', files);\n} catch (err) {\n  console.error(err);\n}\n```\n\n## Options\n\n### `compress|c`\n\n| CLI argument                                                                    | ENV variable                                  |\n| ------------------------------------------------------------------------------- | --------------------------------------------- |\n| [`--incremental`](#--incremental)                                               | `GZIPPER_INCREMENTAL` (`0` or `1`)            |\n| [`-v`, `--verbose`](#-v---verbose)                                              | `GZIPPER_VERBOSE` (`0` or `1`)                |\n| [`-e`, `--exclude \u003cextensions\u003e`](#-e---exclude-extensions)                      | `GZIPPER_EXCLUDE`                             |\n| [`-i`, `--include \u003cextensions\u003e`](#-i---include-extensions)                      | `GZIPPER_INCLUDE`                             |\n| [`-t`, `--threshold \u003cnumber\u003e`](#-t---threshold-number)                          | `GZIPPER_THRESHOLD`                           |\n| [`--gzip`](#--gzip)                                                             | `GZIPPER_GZIP` (`0` or `1`)                   |\n| [`--deflate`](#--deflate)                                                       | `GZIPPER_DEFLATE` (`0` or `1`)                |\n| [`--brotli`](#--brotli)                                                         | `GZIPPER_BROTLI` (`0` or `1`)                 |\n| [`--zopfli`](#--zopfli)                                                         | `GZIPPER_ZOPFLI` (`0` or `1`)                 |\n| [`--zstd`](#--zstd)                                                             | `GZIPPER_ZSTD` (`0` or `1`)                   |\n| [`--gzip-level \u003cnumber\u003e`](#--gzip-level-number)                                 | `GZIPPER_GZIP_LEVEL`                          |\n| [`--gzip-memory-level \u003cnumber\u003e`](#--gzip-memory-level-number)                   | `GZIPPER_GZIP_MEMORY_LEVEL`                   |\n| [`--gzip-strategy \u003cnumber\u003e`](#--gzip-strategy-number)                           | `GZIPPER_GZIP_STRATEGY`                       |\n| [`--deflate-level \u003cnumber\u003e`](#--deflate-level-number)                           | `GZIPPER_DEFLATE_LEVEL`                       |\n| [`--deflate-memory-level \u003cnumber\u003e`](#--deflate-memory-level-number)             | `GZIPPER_DEFLATE_MEMORY_LEVEL`                |\n| [`--deflate-strategy \u003cnumber\u003e`](#--deflate-strategy-number)                     | `GZIPPER_DEFLATE_STRATEGY`                    |\n| [`--brotli-param-mode \u003cvalue\u003e`](#--brotli-param-mode-value)                     | `GZIPPER_BROTLI_PARAM_MODE`                   |\n| [`--brotli-quality \u003cnumber\u003e`](#--brotli-quality-number)                         | `GZIPPER_BROTLI_QUALITY`                      |\n| [`--brotli-size-hint \u003cnumber\u003e`](#--brotli-size-hint-number)                     | `GZIPPER_BROTLI_SIZE_HINT`                    |\n| [`--zopfli-num-iterations \u003cnumber\u003e`](#--zopfli-num-iterations-number)           | `GZIPPER_ZOPFLI_NUM_ITERATIONS`               |\n| [`--zopfli-block-splitting`](#--zopfli-block-splitting)                         | `GZIPPER_ZOPFLI_BLOCK_SPLITTING` (`0` or `1`) |\n| [`--zopfli-block-splitting-max \u003cnumber\u003e`](#--zopfli-block-splitting-max-number) | `GZIPPER_ZOPFLI_BLOCK_SPLITTING_MAX`          |\n| [`--zstd-level \u003cnumber\u003e`](#--zstd-level-number)                                 | `GZIPPER_ZSTD_LEVEL`                          |\n| [`--output-file-format \u003cvalue\u003e`](#--output-file-format-value)                   | `GZIPPER_OUTPUT_FILE_FORMAT`                  |\n| [`--remove-larger`](#--remove-larger)                                           | `GZIPPER_REMOVE_LARGER` (`0` or `1`)          |\n| [`--skip-compressed`](#--skip-compressed)                                       | `GZIPPER_SKIP_COMPRESSED` (`0` or `1`)        |\n| [`--workers \u003cnumber\u003e`](#--workers-number)                                       | `GZIPPER_WORKERS`                             |\n| [`--no-color`](#--no-color)                                                     | `GZIPPER_NO_COLOR` or `NO_COLOR` (`0` or `1`) |\n\n\u003e ENV variables have higher priority over CLI arguments.\n\n#### `--incremental`\n\n`gzipper c ./src --incremental`\n\nA special type of compression that significantly decreases the time of compression\n_(on the second run)_ if you have a lot of big and rarely updated files.\nIt creates a `.gzipper` folder with pre-compressed files (`cache`) and\nconfig that stores all necessary metadata (`.gzipperconfig`).\n\n#### `-v`, `--verbose`\n\n`gzipper c ./src --verbose`\n\nGet more information about executed work.\n_(Could increase time of compression because of gathering additional metrics)_\n\n#### `-e`, `--exclude \u003cextensions\u003e`\n\n`gzipper c ./src --exclude jpeg,jpg,png,ico`\n\nExclude file extensions from compression.\nCompression extensions `br`, `gz`, `zz` and `zst` are\n[excluded by default](https://github.com/gios/gzipper/blob/main/src/enums.ts#L9).\n\n#### `-i`, `--include \u003cextensions\u003e`\n\n`gzipper c ./src --include js,css,html`\n\nInclude file extensions for compression (exclude others).\n\n#### `-t`, `--threshold \u003cnumber\u003e`\n\n`gzipper c ./src --threshold 900`\n\nExclude assets smaller than this byte size. Default is `0` byte.\n\n#### `--gzip`\n\n`gzipper c ./src --gzip`\n\nEnable [gzip](https://wikiless.org/wiki/Gzip) compression. (default behavior)\n\n#### `--deflate`\n\n`gzipper c ./src --deflate`\n\nEnable [Deflate](https://wikiless.org/wiki/DEFLATE) compression.\n\n#### `--brotli`\n\n`gzipper c ./src --brotli`\n\nEnable [Brotli](https://wikiless.org/wiki/Brotli) compression.\n\n#### `--zopfli`\n\n`gzipper c ./src --zopfli`\n\nEnable [Zopfli](https://wikiless.org/wiki/Zopfli) compression.\n\n#### `--zstd`\n\n`gzipper c ./src --zstd`\n\nEnable [Zstandard](https://wikiless.org/wiki/Zstd) compression.\n\n#### `--gzip-level \u003cnumber\u003e`\n\n`gzipper c ./src --gzip-level 8`\n\ngzip compression level:\n`6` (default), `0` (no compression) - `9` (best compression).\nOnly for [`--gzip`](#--gzip).\n\n#### `--gzip-memory-level \u003cnumber\u003e`\n\n`gzipper c ./src --gzip-memory-level 2`\n\nAmount of memory that will be allocated for gzip compression:\n`8` (default), `1` (minimum memory) - `9` (maximum memory).\nOnly for [`--gzip`](#--gzip).\n\n#### `--gzip-strategy \u003cnumber\u003e`\n\n`gzipper c ./src --gzip-strategy 3`\n\ngzip compression strategy:\n`0` (default), `1` (filtered), `2` (huffman only), `3` (RLE), `4` (fixed).\nOnly for [`--gzip`](#--gzip).\n\n#### `--deflate-level \u003cnumber\u003e`\n\n`gzipper c ./src --deflate-level 8`\n\nDeflate compression level:\n`6` (default), `0` (no compression) - `9` (best compression).\nOnly for [`--deflate`](#--deflate).\n\n#### `--deflate-memory-level \u003cnumber\u003e`\n\n`gzipper c ./src --deflate-memory-level 2`\n\nAmount of memory that will be allocated for deflate compression:\n`8` (default), `1` (minimum memory) - `9` (maximum memory).\nOnly for [`--deflate`](#--deflate).\n\n#### `--deflate-strategy \u003cnumber\u003e`\n\n`gzipper c ./src --deflate-strategy 3`\n\nDeflate compression strategy:\n`0` (default), `1` (filtered), `2` (huffman only), `3` (RLE), `4` (fixed).\nOnly for [`--deflate`](#--deflate).\n\n#### `--brotli-param-mode \u003cvalue\u003e`\n\n`gzipper c ./src --brotli-param-mode text`\n\nAvailable values are:\n`text` (for UTF-8 text, default) and `font` (for WOFF 2.0 fonts).\nOnly for [`--brotli`](#--brotli).\n\n#### `--brotli-quality \u003cnumber\u003e`\n\n`gzipper c ./src --brotli-quality 10`\n\nBrotli compression quality: `11` (default), `0` - `11`.\nOnly for [`--brotli`](#--brotli).\n\n#### `--brotli-size-hint \u003cnumber\u003e`\n\n`gzipper c ./src --brotli-size-hint 6`\n\nEstimated total input size for all files to compress:\n`0` (default, which means that the size is unknown).\nOnly for [`--brotli`](#--brotli).\n\n#### `--zopfli-num-iterations \u003cnumber\u003e`\n\n`gzipper c ./src --zopfli-num-iterations 15`\n\nMaximum amount of times to rerun forward and backward pass to optimize LZ77 compression cost.\nGood values: `10`, `15` for small files, `5` for files over several MB in size or it will be too slow.\nOnly for [`--zopfli`](#--zopfli).\n\n#### `--zopfli-block-splitting`\n\n`gzipper c ./src --zopfli-block-splitting`\n\nIf true, splits the data in multiple deflate blocks with optimal choice for the block boundaries.\nBlock splitting gives better compression. Only for [`--zopfli`](#--zopfli).\n\n#### `--zopfli-block-splitting-max \u003cnumber\u003e`\n\n`gzipper c ./src --zopfli-block-splitting-max 5`\n\nMaximum amount of blocks to split into.\n`0` for unlimited, but this can give extreme results that hurt compression on some files.\nOnly for [`--zopfli`](#--zopfli).\n\n#### `--zstd-level \u003cnumber\u003e`\n\n`gzipper c ./src --zstd-level 8`\n\nZstd compression level: `1` (default), `5` (best compression).\nOnly for [`--zstd`](#--zstd).\n\n#### `--output-file-format \u003cvalue\u003e`\n\nOutput file format with artifacts, default format: `[filename].[ext].[compressExt]`.\nWhere: `filename` -\u003e name of your file, `ext` -\u003e file extension,\n`compressExt` -\u003e compress extension (.gz, .br, etc), `hash` -\u003e uniq hash.\n\n_Example:_ Expected project structure.\n\n```\nimg\n  rabbit.jpg\n  cat.jpg\njs\n  main.js\n  modules.js\nxml\n  main.xml\nindex.js\n```\n\n- `gzipper c ./src --output-file-format [filename].[compressExt].[ext]`\n\n  ```\n  img\n    rabbit.jpg\n    rabbit.gz.jpg\n    cat.jpg\n    cat.gz.jpg\n  js\n    main.js\n    main.gz.js\n    modules.js\n    modules.gz.js\n  xml\n    main.xml\n    main.gz.xml\n  index.js\n  index.gz.js\n  ```\n\n- `gzipper c ./src --output-file-format test-[filename]-[hash].[compressExt].[ext]`\n\n  ```\n  img\n    rabbit.jpg\n    cat.jpg\n    test-rabbit-b4564011-ba7c-4bd6-834d-bf6c7791b7d4.gz.jpg\n    test-cat-739c7d7d-53ca-4f8e-912c-bad3b2b515a9.gz.jpg\n  js\n    main.js\n    modules.js\n    test-main-4cc35dbd-36f7-4889-9f41-4d93e7a25bef.gz.js\n    test-modules-bce90cbd-5bf2-43c2-8b61-33aa1599b704.gz.js\n  xml\n    main.xml\n    test-main-a90fa10e-f7a4-4af9-af67-f887bb96f98b.gz.xml\n  index.js\n  test-index-067c1e2d-0e12-4b57-980b-97c880c24d57.gz.js\n  ```\n\n- `gzipper c ./src --output-file-format [filename]-[hash]-[filename]-tmp.[ext].[compressExt]`\n\n  ```\n  img\n    rabbit.jpg\n    rabbit-b4564011-ba7c-4bd6-834d-bf6c7791b7d4-rabbit-tmp.jpg.gz\n    cat.jpg\n    cat-739c7d7d-53ca-4f8e-912c-bad3b2b515a9cat-tmp.jpg.gz\n  js\n    main.js\n    main-4cc35dbd-36f7-4889-9f41-4d93e7a25bef-main-tmp.js.gz\n    modules.js\n    modules-bce90cbd-5bf2-43c2-8b61-33aa1599b704-modules-tmp.js.gz\n  xml\n    main.xml\n    main-a90fa10e-f7a4-4af9-af67-f887bb96f98b-main-tmp.xml.gz\n  index.js\n  index-067c1e2d-0e12-4b57-980b-97c880c24d57-index-tmp.js.gz\n  ```\n\n#### `--remove-larger`\n\nRemoves compressed files larger than uncompressed originals in your directory.\n\n#### `--skip-compressed`\n\nIgnores compressed files that have already exist in your directory.\nOnly with default [`--output-file-format`](#--output-file-format-value).\n\n#### `--workers \u003cnumber\u003e`\n\nSpawn workers for parallel compression.\nBe aware of workers number because every worker creates an additional thread.\nMore info at [nodesource.com](https://nodesource.com/blog/worker-threads-nodejs/).\n\n#### `--no-color`\n\nDisable logger colorful messages.\n\n### `cache`\n\n| Command           |\n| ----------------- |\n| [`purge`](#purge) |\n| [`size`](#size)   |\n\n#### `purge`\n\n`gzipper cache purge`\n\nRemoves all pre-compressed files from `cache` that was generated via [`--incremental`](#--incremental) argument.\n\n#### `size`\n\n`gzipper cache size`\n\nReturns the size of all pre-compiled files from `cache`.\n\n## Changelog\n\n[CHANGELOG.md](./CHANGELOG.md)\n\n## Contribution\n\nI appreciate every contribution, just fork the repository and send the pull request with your changes.\n\n## Support\n\n- Node.js \u003e= 20.11.0\n\n## Prerequisites\n\nIf you want to use [`--zstd`](#--zstd) compression,\nyou have to make sure that the appropriate library\nis installed and available at your environment:\n\n```sh\nwhere zstd.exe   # Windows\ncommand -v zstd  # MacOS/Linux\n```\n\nIf you didn't find executable `zstd` you have to install this manually:\n\n- MacOS using Brew\n\n  ```sh\n  brew install zstd   # zstd only\n  brew install zlib   # whole library\n  ```\n\n- Windows Subsystem for Linux (WSL), Ubuntu, Debian... using APT\n\n  ```sh\n  sudo apt install zstd\n  ```\n","funding_links":["https://www.paypal.com/donate/?hosted_button_id=SJUJDMS6XQACA"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgios%2Fgzipper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgios%2Fgzipper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgios%2Fgzipper/lists"}