Shows the gzipped size of the given file
You can install the command with the following command
deno install -qf --allow-read https://deno.land/x/[email protected]/cli.ts
$ gzip_size tiger.svg
347 kiB
$ gzip_size tiger.svg --raw
355041
$ gzip_size tiger.svg --include-original
357 kiB → 347 kiB
$ gzip_size tiger.svg --include-original --decimal
365 kB → 355 kB
See gzip_size -h
for more details.
import { gzipSize } from "https://deno.land/x/[email protected]/mod.ts";
gzipSize(bytes);
// returns gzipped size of the bytes
MIT