gzipper icon indicating copy to clipboard operation
gzipper copied to clipboard

Request --brotli-param-mode best

Open micheartin opened this issue 3 years ago • 0 comments

I love gzipper and its option --incremental & cache.

In my case (see below), all files (except mainboard.js) are better compressed with --brotli-param-mode font (up to 2% better compression ratio). I would like to get the best of both modes (--brotli-param-mode text and --brotli-param-mode font). I propose to add the best mode:

--brotli-param-mode best

The help should warn about the little gain (often a couple of bytes) while doubling the whole compression time. However, thanks to --incremental we do not care about the compression time. Except in CI/CD environments without gzipper cache

$ yarnpkg gzipper c --brotli --brotli-param-mode text ./dist text
$ yarnpkg gzipper c --brotli --brotli-param-mode font ./dist font
$ du -bac text font | sort -n | grep br$
360	font/index.html.br
367	text/index.html.br
870	font/js/about.js.br
873	text/js/about.js.br
4618	font/favicon.ico.br
4661	text/favicon.ico.br
13625	text/js/mainboard.js.br
13629	font/js/mainboard.js.br
16834	font/js/app.js.br
16862	text/js/app.js.br
147711	font/js/chunk-vendors.js.br
147764	text/js/chunk-vendors.js.br

micheartin avatar Apr 20 '21 07:04 micheartin