From 6c45990abb36d30df875c99f8f54acd6f5b12c31 Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 21 Jul 2021 07:42:41 -0400 Subject: [PATCH] kitty: use zlib level 2, not 6 #1695 --- src/lib/kitty.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/kitty.c b/src/lib/kitty.c index 329c70407..5a0c3b1a0 100644 --- a/src/lib/kitty.c +++ b/src/lib/kitty.c @@ -580,7 +580,9 @@ prep_deflator(unsigned animated, z_stream* zctx, int pixy, int pixx){ memset(zctx, 0, sizeof(*zctx)); if(animated){ int zret; - if((zret = deflateInit(zctx, Z_DEFAULT_COMPRESSION)) != Z_OK){ + // 2 seems to work well for things that are going to compress up + // meaningfully at all, while not taking too much time. + if((zret = deflateInit(zctx, 2)) != Z_OK){ logerror("Couldn't get a deflate context (%d)\n", zret); return -1; }