Print the gzipped size of any file
A simple command to answer the age old question "But how big will it be when gzipped?".
Install the command:
go get github.com/m90/gzipped/cmd/gzipped
Install the library:
go get github.com/m90/gzipped
Pass the location of a file:
gzipped ./styles.css
or use pipes:
cat ./bundle.js | uglifyjs -mangle | gzipped
The following options are available:
Usage of gzipped:
-bytes
display sizes in raw bytes instead of humanized formats
-timeout duration
deadline for stdin to supply data (default 2s)
Refer to the godoc for information about how to use it as a library.
MIT © Frederik Ring