A CLI tool to calculate the gzipped size of files or stdin input for web performance optimization.
gzip-size-cli is a command-line interface tool that calculates the gzipped size of files or standard input. It helps developers understand the compressed transfer size of web assets, which is crucial for optimizing website performance and reducing bandwidth usage. The tool provides various output formats and compression level controls for precise size analysis.
Web developers, frontend engineers, and performance optimization specialists who need to measure and optimize asset sizes in their development workflows and build processes.
Developers choose gzip-size-cli for its simplicity, reliability, and seamless integration into shell scripts and build pipelines. It provides accurate gzip size calculations without the overhead of more complex bundling or analysis tools.
Get the gzipped size of a file or stdin
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
It does one thing well—calculating gzip sizes—and integrates cleanly into shell scripts and build pipelines, as highlighted in its philosophy section.
Accepts both file paths and stdin piping, demonstrated in usage examples like 'cat <file> | gzip-size' for versatile workflow integration.
Allows setting gzip compression from 0 to 9 via the --level option, enabling precise control over size versus performance trade-offs.
Supports human-readable sizes, raw bytes, and original size comparisons with options like --raw and --include-original, as shown in the examples.
Only handles gzip compression, missing modern alternatives like Brotli which are crucial for optimal web performance in many cases.
Requires Node.js to be installed globally, which can be a barrier in environments that avoid Node.js or use alternative runtimes.
Purely reports sizes without offering suggestions for reducing file sizes, unlike more comprehensive tools that include minification or bundling features.