~seirdy/seirdy.one

6c85166241e6edf4b856098750343fddd5de8464 — Rohan Kumar 27 days ago b5e8d35
CI/Makefile: reduce zopfli compression even more

70 iterations seems to be the point at which we hit diminishing returns.
The combined size difference of all *.gz files with 70 iterations and
1000 iterations is 65 bytes.
1 files changed, 3 insertions(+), 9 deletions(-)

M Makefile
M Makefile => Makefile +3 -9
@@ 13,9 13,8 @@ GEMINI_RSYNC_DEST = $(USER):$(GEMINI_ROOT)

OUTPUT_DIR = public
RSYNCFLAGS += -rlvz --zc=zstd
# max compression
ZOPFLI_ITERATIONS=500
ZOPFLI_ITERATIONS_LARGE=75
# compression has dimishing returns after this point
ZOPFLI_ITERATIONS=70

.PHONY: hugo
hugo: clean


@@ 65,13 64,8 @@ test: lint-css hint-devserver check-links

.PHONY: build
build: hugo
# gzip_static + max zopfli compression + brotli_static
ifndef NO_STATIC
	# compress RSS feeds separately, with fewer iterations since they're bigger
	find $(OUTPUT_DIR) -type f -name '*.xml' \
		| grep -v gemini \
		| xargs zopfli --i$(ZOPFLI_ITERATIONS_LARGE) --gzip
	find $(OUTPUT_DIR) -type f -name '*.html' -o -name '*.css' -o -name '*.txt' -o -name '*.asc' -o -name '*.webmanifest' -o -name "*.svg" \
	find $(OUTPUT_DIR) -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' -o -name '*.asc' -o -name '*.webmanifest' -o -name "*.svg" \
		| grep -v gemini \
		| xargs zopfli --i$(ZOPFLI_ITERATIONS) --gzip
	find $(OUTPUT_DIR) -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' -o -name '*.asc' -o -name '*.webmanifest' -o -name "*.svg" \